Files
Yi.Admin/Yi.Framework.Net6/Yi.Framework.WebCore/MiddlewareExtend/AutoMapperExtension.cs

21 lines
538 B
C#
Raw Normal View History

2021-12-25 16:55:11 +08:00
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.IO;
2022-04-12 22:12:11 +08:00
using Yi.Framework.WebCore.Mapper;
2021-12-25 16:55:11 +08:00
namespace Yi.Framework.WebCore.MiddlewareExtend
{
/// <summary>
/// 通用autoMapper扩展
/// </summary>
public static class AutoMapperExtension
{
2022-04-12 22:12:11 +08:00
public static IServiceCollection AddAutoMapperService(this IServiceCollection services)
2021-12-25 16:55:11 +08:00
{
2022-04-12 22:12:11 +08:00
services.AddAutoMapper(typeof(AutoMapperProfile));
2021-12-25 16:55:11 +08:00
return services;
}
}
}