/// <summary> /// Patch changes /// </summary> /// <param name="source"></param> /// <param name="target"></param> public static void Patch(this dataModel.Price source, dataModel.Price target) { if (target == null) { throw new ArgumentNullException("target"); } var patchInjection = new PatchInjection <dataModel.Price>(x => x.ProductId, x => x.List, x => x.MinQuantity, x => x.Sale); target.InjectFrom(patchInjection, source); }
public static dataModel.Price ToDataModel(this coreModel.Price price) { if (price == null) throw new ArgumentNullException("price"); var retVal = new dataModel.Price(); retVal.InjectFrom(price); retVal.ProductId = price.ProductId; retVal.MinQuantity = price.MinQuantity; return retVal; }
public static dataModel.Price ToDataModel(this coreModel.Price price) { if (price == null) { throw new ArgumentNullException("price"); } var retVal = new dataModel.Price(); retVal.InjectFrom(price); retVal.ProductId = price.ProductId; retVal.MinQuantity = price.MinQuantity; return(retVal); }