public static Domain.DataStore.Entities.Campaign ToEntity(Campaign model) { return(new Domain.DataStore.Entities.Campaign() { Id = model.id, Provider = model.provider, PushMessage = model.push_message, Targeting = model.targeting.Select(target => PlaceMapper.ToEntity(target)).ToList() }); }
public static Campaign ToModel(Entities.Campaign entity) { return(new Campaign() { id = entity.Id, provider = entity.Provider, push_message = entity.PushMessage, targeting = entity.Targeting.Select(target => PlaceMapper.ToModel(target)).ToList() }); }