public async Task <SweetAlertExtenstion> UpdateMappingAsync(WarehouseUpdateViewModel vm) { try { var entity = Mapper.Map <Warehouse>(vm); await UpdateAsync(entity); return(SweetAlertExtenstion.Ok()); } catch { return(SweetAlertExtenstion.Error()); } }
public async Task <IActionResult> Update(WarehouseUpdateViewModel vm) { TempData.AddResult(await _warehouseRepository.UpdateMappingAsync(vm)); return(Redirect(IndexUrlWithQueryString)); }