Ali Mukhtar Ali Mukhtar - 1 year ago 536
ASP.NET (C#) Question

Auto mapper version 5 no definition for Mapper.Createmap

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

does not contain a definition for

You can see image here

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

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

Answer Source

CreateMap is an instance method of the base class Profile

Just call

public MappingProfile()
   CreateMap<A,B>() //...
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download