public static BaseTaxModel ToBaseTax(this Tax tax) { BaseTaxModel _result = new BaseTaxModel(); _result.Id = tax.Id; _result.TaxName = tax.TaxName; _result.ApplicableOn = tax.ApplicableOn; _result.Rate = tax.Rate; _result.CalculatingMode = tax.CalculatingMode; _result.Narration = tax.Narration; _result.IsActive = tax.IsActive; _result.CreatedDate = tax.CreatedDate; _result.ModifiedDate = tax.ModifiedDate; return(_result); }
public static Tax ToTax(this BaseTaxModel tax) { Tax _result = new Tax(); if (tax.Id.HasValue) { _result.Id = tax.Id.GetValueOrDefault(); } _result.TaxName = tax.TaxName; _result.ApplicableOn = tax.ApplicableOn; _result.Rate = tax.Rate; _result.CalculatingMode = tax.CalculatingMode; _result.Narration = tax.Narration; _result.IsActive = tax.IsActive; _result.CreatedDate = tax.CreatedDate; _result.ModifiedDate = tax.ModifiedDate; return(_result); }