コード例 #1
0
        public async Task <SweetAlertExtenstion> UpdateMappingAsync(WarehouseUpdateViewModel vm)
        {
            try
            {
                var entity = Mapper.Map <Warehouse>(vm);
                await UpdateAsync(entity);

                return(SweetAlertExtenstion.Ok());
            }
            catch
            {
                return(SweetAlertExtenstion.Error());
            }
        }
コード例 #2
0
        public async Task <IActionResult> Update(WarehouseUpdateViewModel vm)
        {
            TempData.AddResult(await _warehouseRepository.UpdateMappingAsync(vm));

            return(Redirect(IndexUrlWithQueryString));
        }