public async Task <ActionResult> InStorageDetails(Guid?id) { var inStorageService = new InStorageService(); if (id == null || !await inStorageService.ExistsInStorage(id.Value)) { return(RedirectToAction(nameof(InStorageList))); } return(View(await inStorageService.GetOneInStorageById(id.Value))); }
public async Task <ActionResult> InStorageEdit(Guid id) { var inStorageService = new InStorageService(); var data = await inStorageService.GetOneInStorageById(id); return(View(new InStorageEditViewModel() { Id = data.Id, Code = data.Code, Name = data.Name, Category = data.Category, Describe = data.Describe })); }