我正在使用nuxt.js. 我在plugins文件夹中有一个helper.js脚本,它有一个简单的 Test() 函数。现在如何在 helper.js 文件中的页面内调用 Test() 方法。
helper.js文件:
export default function Test() {
return 'This is test'
}
Run Code Online (Sandbox Code Playgroud) 在 TransactionScope 内打开 sql 连接时,它给出“不支持在环境事务中登记”错误。我在 asp.net core 2 应用程序中使用 ado.net。
using (var ts = new TransactionScope())
{
try
{
Connection.Open();
repository.Insert(entity);
ts.Complete();
}
catch (Exception ex)
{
ts.Dispose();
}
finally
{
Connection.Close();
}
}
Run Code Online (Sandbox Code Playgroud)