public static TaxDetailEntity ToDataModel(this TaxDetail taxDetail) { if (taxDetail == null) throw new ArgumentNullException("taxDetail"); var retVal = new TaxDetailEntity(); retVal.InjectFrom(taxDetail); return retVal; }
public virtual void Patch(TaxDetailEntity target) { if (target == null) { throw new ArgumentNullException(nameof(target)); } target.Rate = Rate; target.Amount = Amount; }
/// <summary> /// Patch CatalogBase type /// </summary> /// <param name="source"></param> /// <param name="target"></param> public static void Patch(this TaxDetailEntity source, TaxDetailEntity target) { if (target == null) throw new ArgumentNullException("target"); var patchInjectionPolicy = new PatchInjection<TaxDetailEntity>(x => x.Rate, x => x.Amount); target.InjectFrom(patchInjectionPolicy, source); }