This my Source class
public class Content :IAggregateRoot
{
public Guid Id { get; set; }
public string HeaderImage { get; set; }
public string AboutText { get; set; }
public string Address { get; set; }
public long Phone { get; set; }
public long Mobile { get; set; }
public DateTime CreationTime { get; set; }
}
and this is my Destination class
public class AboutViewModel
{
public string AboutText { get; set; }
public string Address { get; set; }
public long Phone { get; set; }
public long Mobile { get; set; }
}
I just want to ignore extra properties of source and map source to destination with Automapper with this method
public static AboutViewModel ConvertToAboutViewModel(this Content content)
{
// Mapper.CreateMap<Content,AboutViewModel>().ForMember(x=>x.AboutText,)
return Mapper.Map<Content, AboutViewModel>(content);
}
How can I do that??