feat: 增加 IDummy 示例服务
This commit is contained in:
parent
9dfd95ce41
commit
7a95ddc039
|
@ -64,20 +64,16 @@ public static class ServiceCollectionExtensions
|
|||
return db;
|
||||
});
|
||||
|
||||
//// 增加数据服务
|
||||
//services.AddSingleton(typeof(IDataService<>), typeof(DefaultDataService<>));
|
||||
// 增加多数据库支持服务
|
||||
services.AddSingleton<DBManagerService>();
|
||||
|
||||
//// 增加业务服务
|
||||
//services.AddSingleton<IApp, AppService>();
|
||||
// 增加业务服务
|
||||
services.AddSingleton<IDict, DictService>();
|
||||
//services.AddSingleton<IException, ExceptionService>();
|
||||
//services.AddSingleton<IGroup, GroupService>();
|
||||
//services.AddSingleton<ILogin, LoginService>();
|
||||
services.AddSingleton<INavigation, NavigationService>();
|
||||
//services.AddSingleton<IRole, RoleService>();
|
||||
services.AddSingleton<IUser, UserService>();
|
||||
|
||||
// 增加示例数据服务
|
||||
services.AddSingleton<IDummy, DummyService>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
using BootstrapClient.Web.Core;
|
||||
using PetaPoco;
|
||||
|
||||
namespace BootstrapClient.DataAccess.PetaPoco.Services;
|
||||
|
||||
internal class DummyService : IDummy
|
||||
{
|
||||
private IDatabase Database { get; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="db"></param>
|
||||
public DummyService(DBManagerService db)
|
||||
{
|
||||
Database = db.Create();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
|
||||
// Licensed under the LGPL License, Version 3.0. See License.txt in the project root for license information.
|
||||
// Website: https://admin.blazor.zone
|
||||
|
||||
namespace BootstrapClient.Web.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 数据服务示例接口
|
||||
/// </summary>
|
||||
public interface IDummy
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue