mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-06 01:30:53 +08:00
添加automapper的依赖注入
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System;
|
||||
using System.IO;
|
||||
using Yi.Framework.WebCore.Mapper;
|
||||
|
||||
namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
{
|
||||
@@ -10,9 +11,9 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
/// </summary>
|
||||
public static class AutoMapperExtension
|
||||
{
|
||||
public static IServiceCollection AddAutoMapperExtensionService(this IServiceCollection services,Type type)
|
||||
public static IServiceCollection AddAutoMapperService(this IServiceCollection services)
|
||||
{
|
||||
services.AddAutoMapper(type);
|
||||
services.AddAutoMapper(typeof(AutoMapperProfile));
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user