Ejemplo n.º 1
0
 /// <summary>
 /// Converts to Blog Model
 /// </summary>
 /// <param name="blogViewModel"></param>
 /// <returns></returns>
 public static Blog ConvertToBlogModel(this BlogViewModel blogViewModel)
 {
     Mapper.CreateMap <BlogViewModel, Blog>()
     .ForMember(bl => bl.Id, src => src.MapFrom(b => b.PostId));
     return(Mapper.Map <BlogViewModel, Blog>(blogViewModel));
 }