예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
 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);
 }