安装所需的包
Install-Package AutoMapper.Extensions.Microsoft.DependencyInjection
配置AutoMapper
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
}
添加测试模型
public class QueueInfo
{
public string Id {
get;