增加功能:日志记录数据库脚本最后命令 closed #IVGH4
#Issue https://gitee.com/LongbowEnterprise/dashboard/issues?id=IVGH4
This commit is contained in:
parent
238a630648
commit
80f27b5cf3
|
@ -14,7 +14,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.Mvc" Version="2.2.4" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="3.1.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" PrivateAssets="All" />
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="2.1.0" />
|
||||
<PackageReference Include="Longbow.Data" Version="2.2.8" />
|
||||
<PackageReference Include="Longbow.Logging" Version="2.2.6" />
|
||||
<PackageReference Include="Longbow.Security.Cryptography" Version="1.3.0" />
|
||||
<PackageReference Include="Longbow.Web" Version="2.2.10" />
|
||||
<PackageReference Include="Longbow.Cache" Version="2.2.7" />
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using PetaPoco;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Bootstrap.DataAccess
|
||||
{
|
||||
|
@ -15,6 +17,7 @@ namespace Bootstrap.DataAccess
|
|||
public static IDatabase Create(string connectionName = null, bool keepAlive = false)
|
||||
{
|
||||
var db = Longbow.Data.DbManager.Create(connectionName, keepAlive);
|
||||
db.ExceptionThrown += (sender, args) => args.Exception.Log(new NameValueCollection() { ["LastCmd"] = db.LastCommand });
|
||||
return db.AddMaps();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue