public HomeClientController() { myService = new ServiceCategory(); serviceCountry = new ServiceCountry(); serviceState = new ServiceState(); serviceCategory = new ServiceCategory(); serviceSubCategory = new ServiceSubCategory(); serviceCar = new ServiceCar(); serviceRating = new ServiceRating(); serviceUser = new ServiceUser(); }
public async Task <IActionResult> PostServiceCountryAsync([FromBody] ServiceCountry serviceCountry) { var response = new Response(); try { _context.ServiceCountries.Add(serviceCountry); await _context.SaveChangesAsync(); } catch (Exception ex) { response.DidError = true; response.ErrorMessage = ex.ToString(); } return(response.ToHttpResponse()); }
public AdminController() { myService = new ServiceUser(); serviceState = new ServiceState(); serviceCountry = new ServiceCountry(); }