public async Task <IActionResult> Create() { try { var people = await _peopleService.FindAllAsync(); var product = await _productService.FindAllAsync(); var viewModel = new OfferFormViewModels { Peoples = people, Products = product }; return(View(viewModel)); } catch (Exception e) { return(RedirectToAction(nameof(Error), new { message = e.Message })); } }
public async Task <IActionResult> Index() { var list = await _people.FindAllAsync(); return(View(list)); }