コード例 #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();
 }
コード例 #2
0
        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());
        }
コード例 #3
0
 public AdminController()
 {
     myService      = new ServiceUser();
     serviceState   = new ServiceState();
     serviceCountry = new ServiceCountry();
 }