Esempio n. 1
0
 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());
        }
Esempio n. 3
0
 public AdminController()
 {
     myService      = new ServiceUser();
     serviceState   = new ServiceState();
     serviceCountry = new ServiceCountry();
 }