Exemple #1
0
 public ActionResult UpdateTaxRegimeType(long id, TaxRegimeTypeViewModel viewModel)
 => _taxRegimeTypeOperation
 .Update(id, viewModel.ToDto())
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: tr => Ok(TaxRegimeTypeViewModel.FromDto(tr)));
Exemple #2
0
 public ActionResult CreateTaxRegimeType(TaxRegimeTypeViewModel viewModel)
 => _taxRegimeTypeOperation
 .Create(viewModel.ToDto())
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: t => Ok(TaxRegimeTypeViewModel.FromDto(t)));