Trying to add AutoMapper to Asp.net Core 2?

后端 未结 10 1642
我在风中等你
我在风中等你 2020-12-23 19:20

I worked on a asp.net core 1.1 project a while ago and use in projetc AutoMapper.

in asp.net core 1.1, I add services.AddAutoMapper() in startup file :<

10条回答
  •  有刺的猬
    2020-12-23 19:52

    If you are using AspNet Core 2.2 and AutoMapper.Extensions.Microsoft.DependencyInjection v6.1 You need to use in Startup file

    services.AddAutoMapper(typeof(Startup));
    

提交回复
热议问题