refactor: 移除基类

This commit is contained in:
Argo-Tianyi 2022-01-12 22:41:15 +08:00
parent 92f615c730
commit 663580b8ae
9 changed files with 21 additions and 21 deletions

View File

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

View File

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

View File

@ -1,12 +0,0 @@
using PetaPoco;
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
abstract class BaseDatabase
{
/// <summary>
///
/// </summary>
[NotNull]
protected IDatabase? Database { get; set; }
}

View File

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

View File

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

View File

@ -4,8 +4,10 @@ using PetaPoco;
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
class GroupService : BaseDatabase, IGroup
class GroupService : IGroup
{
private IDatabase Database { get; }
/// <summary>
///
/// </summary>

View File

@ -7,8 +7,10 @@ namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
/// <summary>
///
/// </summary>
class NavigationService : BaseDatabase, INavigation
class NavigationService : INavigation
{
private IDatabase Database { get; }
/// <summary>
///
/// </summary>

View File

@ -4,8 +4,10 @@ using PetaPoco;
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
class RoleService : BaseDatabase, IRole
class RoleService : IRole
{
private IDatabase Database { get; }
/// <summary>
///
/// </summary>

View File

@ -5,8 +5,10 @@ using PetaPoco;
namespace BootstrapAdmin.DataAccess.PetaPoco.Services;
class UserService : BaseDatabase, IUser
class UserService : IUser
{
private IDatabase Database { get; }
/// <summary>
///
/// </summary>