refactor: 移除基类
This commit is contained in:
parent
92f615c730
commit
663580b8ae
|
@ -1,14 +1,12 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Bootstrap Admin 后台管理菜单相关操作实体类
|
||||
/// </summary>
|
||||
[Table("Navigations")]
|
||||
public class Navigation
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
@ -3,8 +3,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class AppService : BaseDatabase, IApp
|
||||
class AppService : IApp
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
public AppService(IDatabase db)
|
||||
{
|
||||
Database = db;
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
using PetaPoco;
|
||||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
abstract class BaseDatabase
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
protected IDatabase? Database { get; set; }
|
||||
}
|
|
@ -7,8 +7,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class DictService : BaseDatabase, IDict
|
||||
class DictService : IDict
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
private string AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -4,8 +4,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class ExceptionService : BaseDatabase, IException
|
||||
class ExceptionService : IException
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
public ExceptionService(IDatabase db) => Database = db;
|
||||
|
||||
public bool Log(Error exception)
|
||||
|
|
|
@ -4,8 +4,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class GroupService : BaseDatabase, IGroup
|
||||
class GroupService : IGroup
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -7,8 +7,10 @@ namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
|||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
class NavigationService : BaseDatabase, INavigation
|
||||
class NavigationService : INavigation
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -4,8 +4,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class RoleService : BaseDatabase, IRole
|
||||
class RoleService : IRole
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -5,8 +5,10 @@ using PetaPoco;
|
|||
|
||||
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
|
||||
|
||||
class UserService : BaseDatabase, IUser
|
||||
class UserService : IUser
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue