// GET: Stores public async Task <ActionResult> Index() { var result = await Service.Get(); ResultHelper.SetResult(this, result); return(View(result.stores)); }
public ActionResult getStore(string username) { try { Stores history = _storesService.Get(_ => _.Username.Equals(username)); return(Ok(history)); } catch (Exception e) { return(BadRequest(e.Message)); } }
private async Task LoadDropDownLists() { var result = await StoreService.Get(); ResultHelper.SetResult(this, result); if (result.Success) { ViewData["Stores"] = new SelectList((List <Store>)result.stores, "Id", "Name"); } else { ViewData["Stores"] = new SelectList(new List <Store>()); } }