public static dataModel.StoreShippingMethod ToDataModel(this coreModel.ShippingMethod shippingMethod) { if (shippingMethod == null) throw new ArgumentNullException("shippingMethod"); var retVal = new dataModel.StoreShippingMethod(); retVal.InjectFrom(shippingMethod); return retVal; }
/// <summary> /// Patch changes /// </summary> /// <param name="source"></param> /// <param name="target"></param> public static void Patch(this dataModel.StoreShippingMethod source, dataModel.StoreShippingMethod target) { if (target == null) { throw new ArgumentNullException("target"); } var patchInjectionPolicy = new PatchInjection <dataModel.StoreShippingMethod>(x => x.LogoUrl, x => x.Name, x => x.Description, x => x.Priority, x => x.IsActive); target.InjectFrom(patchInjectionPolicy, source); }
public static dataModel.StoreShippingMethod ToDataModel(this coreModel.ShippingMethod shippingMethod) { if (shippingMethod == null) { throw new ArgumentNullException("shippingMethod"); } var retVal = new dataModel.StoreShippingMethod(); retVal.InjectFrom(shippingMethod); return(retVal); }