using AutoMapper;
using GxPress.Mappings;
using Microsoft.Extensions.DependencyInjection;
namespace GxPress.Api.ServiceExtensions
{
public static class AutoMapperExtension
{
///
/// 添加映射框架
///
///
///
public static IServiceCollection AddMappers(this IServiceCollection services)
{
//ProcessMapping所在程序集的所有Profile都会被注册
services.AddAutoMapper(typeof(ProcessMapping));
return services;
}
}
}