public async Task <IActionResult> CreateApp() { var stores = await _AppsHelper.GetOwnedStores(GetUserId()); if (stores.Length == 0) { StatusMessage = "Error: You must have created at least one store"; return(RedirectToAction(nameof(ListApps))); } var vm = new CreateAppViewModel(); vm.SetStores(stores); return(View(vm)); }
public async Task <IActionResult> CreateApp() { var stores = await _AppsHelper.GetOwnedStores(GetUserId()); if (stores.Length == 0) { StatusMessage = new StatusMessageModel() { Html = $"Error: You must have created at least one store. <a href='{(Url.Action("CreateStore", "UserStores"))}'>Create store</a>", Severity = StatusMessageModel.StatusSeverity.Error }.ToString(); return(RedirectToAction(nameof(ListApps))); } var vm = new CreateAppViewModel(); vm.SetStores(stores); return(View(vm)); }