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.
23 lines
559 B
23 lines
559 B
2 years ago
|
using AutoMapper;
|
||
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
using System;
|
||
|
using Znyc.Admin.Commons.Mapping;
|
||
|
|
||
|
namespace Znyc.Admin.Commons.Module
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// AutoMapperService
|
||
|
/// </summary>
|
||
|
public class AutoMapperService
|
||
|
{
|
||
|
/// <summary>
|
||
|
///
|
||
|
/// </summary>
|
||
|
/// <param name="provider"></param>
|
||
|
public static void UsePack(IServiceProvider provider)
|
||
|
{
|
||
|
IMapper mapper = provider.GetService<IMapper>();
|
||
|
MapperExtensions.SetMapper(mapper);
|
||
|
}
|
||
|
}
|
||
|
}
|