public ActionResult Reservation(Car car, Customer customer, int reservationId) { carRepository.Create(car); customerRepository.Create(customer); var reservation = reservationRepository.Get(reservationId); var maintenance = maintenanceService.Create(car.Id, customer.Id, reservation); var services = serviceTypeRepository.GetServiceTypes().ToList(); return(View("CountPrice", new CountPriceViewModel { MaintenanceId = maintenance.Id, Services = services })); }
public async Task <ActionResult <ServiceType> > GetServiceTypes(int cityid) { try { var result = await Task.FromResult(serviceTypeRepository.GetServiceTypes(cityid)); return(Ok(result)); } catch (Exception ex) { logger.LogError($"Exception at Login Method: {ex}"); return(StatusCode(500, "Internal server error")); } }
public IActionResult Index() { return(View(_serviceTypeRepository.GetServiceTypes())); }