山东雷驰
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.
 
 
 
 

29 lines
842 B

using Kean.Application.Utilities.Implements;
using Kean.Application.Utilities.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using Pluralize.NET;
namespace Kean.Application.Utilities
{
/// <summary>
/// 依赖注入
/// </summary>
public sealed class DependencyInjection
{
/// <summary>
/// 初始化 Kean.Application.Utilities.DependencyInjection 类的新实例
/// </summary>
/// <param name="services">服务描述符</param>
public DependencyInjection(IServiceCollection services)
{
// AutoMapper
services.AddAutoMapper(typeof(AutoMapper));
// Tools
services.AddSingleton<IPluralize, Pluralizer>();
// Services
services.AddScoped<ICrudService, CrudService>();
}
}
}