コード例 #1
0
ファイル: RideManager.cs プロジェクト: omercavuslu/RideShare
 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,
     });
 }
コード例 #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()
     });
 }