Example #1
0
 public async Task <IActionResult> GetGarageList()
 {
     try
     {
         var model = new GarageListViewModel()
         {
             Garages = await _garageService.GetGarages()
         };
         return(PartialView("_garages", model));
     }
     catch (Exception ex)
     {
         ex.ToExceptionless().Submit();
         return(BadRequest());
     }
 }
Example #2
0
        public async Task <IActionResult> Index()
        {
            try
            {
                var model = new GarageListViewModel()
                {
                    RootUrl = BaseRootUrl,
                    Garages = await _garageService.GetGarages()
                };

                return(View(model));
            }
            catch (Exception ex)
            {
                ex.ToExceptionless().Submit();
                return(BadRequest());
            }
        }