public IActionResult Create() { ShiftViewModel model = new ShiftViewModel { Drivers = _combosHelper.GetComboDrivers(), Services = _combosHelper.GetComboServices() }; return(View(model)); }
public ShiftViewModel ToShiftViewModel(ShiftEntity shiftEntity) { return(new ShiftViewModel { Id = shiftEntity.Id, User = shiftEntity.User.Id, Service = shiftEntity.Service.Id, Date = shiftEntity.Date, Drivers = _combosHelper.GetComboDrivers(), Services = _combosHelper.GetComboServices() }); }