public async Task <IActionResult> Index()
        {
            var response = await _shelterService.List();

            if (response.Success)
            {
                return(View(response.Data));
            }
            else
            {
                ErrorAlert(response.Message);
                return(RedirectToAction("Index", "Home"));
            }
        }
Beispiel #2
0
 private async Task GenerateViewBags(PetDto dto)
 {
     ViewBag.Shelters = new SelectList(_shelterApiService.List().Result.Data, "ShelterId", "ShelterName", dto.ShelterId);
 }