0

I'am currently following a tutorial of ASP.NET MVC in which instructor use auto mapper version 4.x and now i have only option of version 5.

When I create a mapping profile in which i get an error Mapper does not contain a definition for CreateMap:

You can see image here

I've attached all pictures of : My Mapping Profile. My Global.asax.cs. /api/customer is working fine. /api/movies is not working.

Is there something wrong i did or missed something? Here's the link of my images

Ali Mukhtar
  • 11
  • 1
  • 6
  • There are breaking changes to the API in V5 - see here: https://github.com/AutoMapper/AutoMapper/wiki/5.0-Upgrade-Guide – Charleh Oct 06 '16 at 09:59

1 Answers1

9

CreateMap is an instance method of the base class Profile

Just call

public MappingProfile()
{
   CreateMap<A,B>() //...
}
Anton Sizikov
  • 9,105
  • 1
  • 28
  • 39