// GET: Stores/Details/5 public ActionResult Details(int?id) { if (!id.HasValue) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var input = new GetStoresInput { Id = id.Value }; var output = _storeAppService.GetStore(input); if (!output.Stores.Any()) { return(HttpNotFound()); } return(View(output.Stores.First())); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <PartialViewResult> UpsertStoreModal(long?id) { StoreViewModel model = new StoreViewModel(new StoreDto()); if (id.HasValue) { var dto = await _appService.GetStore(id.Value); model = new StoreViewModel(dto); } return(PartialView("_UpsertStoreModal", model)); }