AutoMapper 9.0的配置和使用

我在实施AutoMapper 9.0时遇到了困难,无法弄清我所缺少的内容,因此将不胜感激。 c#.net框架。 我认为这是我的Profile类的外观。

 public class AmProfile : Profile
{
    public AmProfile()
    {
        CreateMap<Inventory,InventorymDto>(MemberList.None);
    }
}

这是我认为需要放入应用程序开始类中的内容。

static void Main(string[] args)
    {
        var config = new MapperConfiguration(cfg =>
        {
            cfg.AddProfile<AmProfile>();
        });
    }

如何在应用程序中使用他进行映射。这与我在早期版本中使用AutoMapper的方式非常不同,因此我不确定哪一部分不正确。

weiwei398 回答:AutoMapper 9.0的配置和使用

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2389567.html

大家都在问