public Models.Tax Create(Parameters.CreateParameter param) { param.Validate(); assertTaxNotExist(param.Code, param.OrganizationId); Models.Tax tax = param.ParseToTax(); repository.Insert(tax); return(tax); }
public void Insert(TaxTypeModel taxtypemodel) { Mapper.Initialize(cfg => { cfg.CreateMap <TaxTypeModel, TaxType>(); }); var tax = Mapper.Map <TaxType>(taxtypemodel); taxRepository.Insert(tax); }