Exemplo n.º 1
0
 public static coreModel.Price ToCoreModel(this googleModel.Price price)
 {
     var retVal = new coreModel.Price();
     retVal.InjectFrom(price);
     retVal.Currency = price.Currency;
     return retVal;
 }
Exemplo n.º 2
0
 public static coreModel.Price ToCoreModel(this googleModel.Price price)
 {
     var retVal = new coreModel.Price();
     retVal.InjectFrom(price);
     retVal.Currency = (CurrencyCodes) Enum.Parse(typeof(CurrencyCodes), price.Currency);
     return retVal;
 }
Exemplo n.º 3
0
        public static coreModel.Price ToCoreModel(this webModel.Price price)
        {
            var retVal = new coreModel.Price();

            retVal.InjectFrom(price);
            retVal.Currency = price.Currency;
            return(retVal);
        }
        public static coreModel.Price ToCoreModel(this googleModel.Price price)
        {
            var retVal = new coreModel.Price();

            retVal.InjectFrom(price);
            retVal.Currency = (CurrencyCodes)Enum.Parse(typeof(CurrencyCodes), price.Currency);
            return(retVal);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="dbEntity"></param>
        /// <returns></returns>
        public static coreModel.Price ToCoreModel(this dataModel.Price dbEntity)
        {
            if (dbEntity == null)
                throw new ArgumentNullException("dbEntity");

            var retVal = new coreModel.Price();

            retVal.InjectFrom(dbEntity);

            retVal.ProductId = dbEntity.ProductId;
            retVal.MinQuantity = (int)dbEntity.MinQuantity;

            if (dbEntity.Pricelist != null)
            {
                retVal.Currency = dbEntity.Pricelist.Currency;
            }

            return retVal;

        }
Exemplo n.º 6
0
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="dbEntity"></param>
        /// <returns></returns>
        public static coreModel.Price ToCoreModel(this dataModel.Price dbEntity)
        {
            if (dbEntity == null)
            {
                throw new ArgumentNullException("dbEntity");
            }

            var retVal = new coreModel.Price();

            retVal.InjectFrom(dbEntity);

            retVal.ProductId   = dbEntity.ProductId;
            retVal.MinQuantity = (int)dbEntity.MinQuantity;

            if (dbEntity.Pricelist != null)
            {
                retVal.Currency = dbEntity.Pricelist.Currency;
            }

            return(retVal);
        }