refactor: 使用 Error 作为 Exception 表实体类

This commit is contained in:
Argo-Tianyi 2022-01-02 13:48:59 +08:00
parent eab30a9a6d
commit 9e550a896c
4 changed files with 9 additions and 5 deletions

View File

@ -5,7 +5,7 @@ namespace BootstrapAdmin.DataAccess.Models;
/// <summary>
/// 异常实体类
/// </summary>
public class Exception
public class Error
{
/// <summary>
/// 获得/设置 主键

View File

@ -21,6 +21,7 @@ class BootstrapAdminConventionMapper : ConventionMapper
ti.TableName = pocoType.Name switch
{
"Error" => "Exceptions",
_ => $"{pocoType.Name}s"
};
return ti;

View File

@ -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;
}

View File

@ -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);
}