c# - Auto mapper does not work. -
After
I used in my method but it does not work. Please help me improve it.
public virtual IEnumerable & lt; TViewModel & gt; FindAllByCriteria (
Error message:
Missing type map configuration or unsupported mapping. Mapping Type: Tag - & gt; Tagview model where Blogs Model Tag - & gt; Jahan.Blog.ViewModel.TagViewModel Destination Path: List` 1 [0] Source Price: System.Data.Entity.DynamicProxies.Tag_F1F5C39705DF9507B542CCC1A519D0757945F8E00B19F4F20C89F81DF8358563
You must first configure the map:
Mapper.CreateMap & LT; Tag, TagViewModel & gt; ();
Then you can map this way:
on destination_VMList = Mapper.Map & LT; IEnumerable & LT; TModel & gt;, IEnumerable & LT; TViewModel & gt; & Gt; (Source_tModelList);
Comments
Post a Comment