refactor: 使用 Error 作为 Exception 表实体类
This commit is contained in:
parent
eab30a9a6d
commit
9e550a896c
|
@ -5,7 +5,7 @@ namespace BootstrapAdmin.DataAccess.Models;
|
|||
/// <summary>
|
||||
/// 异常实体类
|
||||
/// </summary>
|
||||
public class Exception
|
||||
public class Error
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得/设置 主键
|
|
@ -21,6 +21,7 @@ class BootstrapAdminConventionMapper : ConventionMapper
|
|||
|
||||
ti.TableName = pocoType.Name switch
|
||||
{
|
||||
"Error" => "Exceptions",
|
||||
_ => $"{pocoType.Name}s"
|
||||
};
|
||||
return ti;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
using BootstrapAdmin.Web.Core;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
using BootstrapAdmin.Web.Core;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class ExceptionService : IException
|
||||
{
|
||||
public bool Log(Models.Exception exception)
|
||||
public bool Log(Error exception)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
namespace BootstrapAdmin.Web.Core;
|
||||
using BootstrapAdmin.DataAccess.Models;
|
||||
|
||||
namespace BootstrapAdmin.Web.Core;
|
||||
|
||||
public interface IException
|
||||
{
|
||||
bool Log(DataAccess.Models.Exception exception);
|
||||
bool Log(Error exception);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue