public async Task <SweetAlertExtenstion> UpdateTariff(TariffUpdateViewModel model) { var result = model.ToEntity(await GetByIdAsync(model.Id)); await UpdateAsync(result); return(SweetAlertExtenstion.Ok()); }
public async Task <IActionResult> Update(TariffUpdateViewModel model) { var result = await _tariffRepository.UpdateTariff(model); TempData.AddResult(result); return(Redirect(IndexUrlWithQueryString)); }