KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a domain model that contains a collection and I want to use AutoMapper to map the parent and children to the view model but I don't want children that have been "soft" deleted to be taken across. For instance: public class Customer { public EntitySet<Order> {get;set;} } public class Order { public DateTime? DeletedDate {get;set;} } my AutoMapper definition would be Mapper.CreateMap<Customer, CustomerViewModel>(); Mapper.CreateMap<Order, OrderViewModel>(); and I don't want Orders to be in the view model that have a value for DeletedDate. Is that possible in AutoMapper? Many thanks in advance, Steve.
Tags (comma-separated)
Save Edits
Cancel