You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
844 B
25 lines
844 B
using Kean.Infrastructure.Database.Repository.Default;
|
|
using Kean.Infrastructure.Database.Repository.Record;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Kean.Infrastructure.Database.Repository
|
|
{
|
|
/// <summary>
|
|
/// 依赖注入
|
|
/// </summary>
|
|
public sealed class DependencyInjection
|
|
{
|
|
/// <summary>
|
|
/// 初始化 Kean.Infrastructure.Database.Repository.DependencyInjection 类的新实例
|
|
/// </summary>
|
|
/// <param name="services">服务描述符</param>
|
|
public DependencyInjection(IServiceCollection services)
|
|
{
|
|
services.AddScoped<IDatabaseCollection, DatabaseCollection>(); // 数据库集合注入
|
|
|
|
services.AddScoped<IDefaultDb, DefaultDb>(); // 默认库
|
|
|
|
//services.AddScoped<IRecordDb, RecordDb>();
|
|
}
|
|
}
|
|
}
|