Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }