I have VS2010, 12, 13, 15 on my machine. All versions except 15 (Enterprise) work with Intellisense for Automapper.
Code:
class Program
{
static void Main(string[] args)
{
Mapper.CreateMap<B, C>()
.ForMember(x => x.) // this is where it breaks
}
}
class B
{
public string BB { get; set; }
}
class C
{
public string CC { get; set; }
}
I have reproduced this on two machines now by:
install-package automapper
In previous VS versions, as soon as I hit the x => x.
I get Intellisense with destination members.
I faced a similar issue. What I have observed is you need to provide the complete syntax for the intellisense to show up
Copy-paste the sample code below and replace with your source and destinations. Then remove the sample items ".ChildDetails", you will start seeing intellisense!
Mapper.CreateMap<tblBusinessName, BusinessNameBO>() .ForMember(dest => dest.ChildDetails, m => m.MapFrom(s => s.tblBusinessNameChild));
Try this:
what AutoMapper version you have installed?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.