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, }); }
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() }); }