public TaxTypeModel GetById(int id)
        {
            var tax = taxRepository.GetById(id);

            Mapper.Initialize(cfg => { cfg.CreateMap <TaxType, TaxTypeModel>(); });

            var taxModel = Mapper.Map <TaxTypeModel>(tax);


            return(taxModel);
        }
示例#2
0
        public void DeleteTax(int id)
        {
            var tax = _taxRepository.GetById(id);

            _taxRepository.Delete(tax);
        }
示例#3
0
 public Task <TaxReadModel> GetById(Guid taxId, CancellationToken cancellationToken) =>
 _taxRepository.GetById(taxId, cancellationToken);