public async Task <IActionResult> IndexAsync() { var model = new HomeViewModel(); model.Businesses = await _businessServices.GetAll(); if (_signIngManager.IsSignedIn(User)) { return(RedirectToAction("Index", "Event")); } else { return(View(model)); } //model.Events = new List<Event>(); }
public async Task <IActionResult> Index() { var businesses = await _businessServices.GetAll(); return(View(businesses)); }