添加automapper

This commit is contained in:
橙子
2021-12-25 16:55:11 +08:00
parent e639d3d2cc
commit 5a9b37ffa6
9 changed files with 118 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.IO;
namespace Yi.Framework.WebCore.MiddlewareExtend
{
/// <summary>
/// 通用autoMapper扩展
/// </summary>
public static class AutoMapperExtension
{
public static IServiceCollection AddAutoMapperExtensionService(this IServiceCollection services,Type type)
{
services.AddAutoMapper(type);
return services;
}
}
}