public static Models.EventViewModel MapToViewModel(this Models.Event model) { Models.EventViewModel eventMapped = new Models.EventViewModel(); eventMapped.Title = model.Title; eventMapped.Description = model.Description; eventMapped.Location = model.Location; eventMapped.Id = model.Id; eventMapped.Days = model.Days; eventMapped.StartDate = model.StartDate; eventMapped.AudiencePluralName = model.Audience.GetPluralizedName(); return(eventMapped); }
public static Models.Event MapToModel(this Models.EventViewModel model) { Models.Event eventMapped = new Models.Event(); eventMapped.Title = model.Title; eventMapped.Description = model.Description; eventMapped.Location = model.Location; eventMapped.Id = model.Id; eventMapped.Audience = (AudienceType)model.Audience; eventMapped.Days = model.Days.Value; eventMapped.StartDate = model.StartDate.Value; eventMapped.OwnerId = model.OwnerId; return(eventMapped); }
public static Models.EventViewModel MapToViewModel(this Models.Event model) { Models.EventViewModel eventMapped = new Models.EventViewModel(); eventMapped.Title = model.Title; eventMapped.Act = model.Act; eventMapped.Description = model.Description; eventMapped.DepartureLocation = model.DepartureLocation; eventMapped.ArrivalLocation = model.ArrivalLocation; eventMapped.Id = model.Id; eventMapped.Days = model.Days; eventMapped.StartDate = model.StartDate; eventMapped.ContainerPluralName = model.ContainerType.GetPluralizedName(); return(eventMapped); }
public static Models.Event MapToModel(this Models.EventViewModel model) { Models.Event eventMapped = new Models.Event(); eventMapped.Title = model.Title; eventMapped.Act = model.Act; eventMapped.Description = model.Description; eventMapped.DepartureLocation = model.DepartureLocation; eventMapped.ArrivalLocation = model.ArrivalLocation; eventMapped.Id = model.Id; eventMapped.ContainerType = (ContainerType)model.ContainerType; eventMapped.Days = model.Days.Value; eventMapped.StartDate = model.StartDate.Value; eventMapped.OwnerId = model.OwnerId; return(eventMapped); }