Ejemplo n.º 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)));
Ejemplo n.º 2
0
 public ActionResult CreateTaxRegimeType(TaxRegimeTypeViewModel viewModel)
 => _taxRegimeTypeOperation
 .Create(viewModel.ToDto())
 .Match <ActionResult>(
     Left: err => BadRequest(err.Message),
     Right: t => Ok(TaxRegimeTypeViewModel.FromDto(t)));