Exemple #1
0
 public RideUpdateViewModel MapToUpdateViewModel(RideDataModel model)
 {
     return(new RideUpdateViewModel()
     {
         Date = model.Date,
         from = model.from,
         to = model.to,
         seat = model.seat,
         description = model.description,
         isActive = model.isActive,
     });
 }
Exemple #2
0
 private RideViewModel MapToViewModel(RideDataModel model)
 {
     return(new RideViewModel()
     {
         Date = model.Date,
         from = model.from,
         to = model.to,
         seat = model.seat,
         description = model.description,
         isActive = model.isActive,
         Reservations = model.Reservations.Select(x => MapToViewModel(x)).ToList()
     });
 }