public async Task <SweetAlertExtenstion> InsertTariff(TariffInsertViewModel model) { var result = model.ToEntity(); await AddAsync(result); return(SweetAlertExtenstion.Ok()); }
public async Task <IActionResult> Insert(TariffInsertViewModel model) { var result = await _tariffRepository.InsertTariff(model); TempData.AddResult(result); return(Redirect(IndexUrlWithQueryString)); }