예제 #1
0
        public static coreModel.InventoryInfo ToCoreModel(this webModel.InventoryInfo inventory)
        {
            var retVal = new coreModel.InventoryInfo();

            retVal.InjectFrom(inventory);
            return(retVal);
        }
예제 #2
0
		/// <summary>
		/// Converting to model type
		/// </summary>
		/// <param name="catalogBase"></param>
		/// <returns></returns>
		public static coreModel.InventoryInfo ToCoreModel(this dataModel.Inventory dbEntity)
		{
			if (dbEntity == null)
				throw new ArgumentNullException("dbEntity");

			var retVal = new coreModel.InventoryInfo();
			retVal.InjectFrom(dbEntity);
			retVal.Status = (coreModel.InventoryStatus)dbEntity.Status;
			retVal.ProductId = dbEntity.Sku;


			retVal.ReservedQuantity = (long)dbEntity.ReservedQuantity;
			retVal.BackorderQuantity = (long)dbEntity.BackorderQuantity;
			retVal.InStockQuantity = (long)dbEntity.InStockQuantity;
			retVal.PreorderQuantity = (long)dbEntity.PreorderQuantity;
			retVal.ReorderMinQuantity = (long)dbEntity.ReorderMinQuantity;
			

			return retVal;

		}
예제 #3
0
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="catalogBase"></param>
        /// <returns></returns>
        public static coreModel.InventoryInfo ToCoreModel(this dataModel.Inventory dbEntity)
        {
            if (dbEntity == null)
            {
                throw new ArgumentNullException("dbEntity");
            }

            var retVal = new coreModel.InventoryInfo();

            retVal.InjectFrom(dbEntity);
            retVal.Status    = (coreModel.InventoryStatus)dbEntity.Status;
            retVal.ProductId = dbEntity.Sku;


            retVal.ReservedQuantity   = (long)dbEntity.ReservedQuantity;
            retVal.BackorderQuantity  = (long)dbEntity.BackorderQuantity;
            retVal.InStockQuantity    = (long)dbEntity.InStockQuantity;
            retVal.PreorderQuantity   = (long)dbEntity.PreorderQuantity;
            retVal.ReorderMinQuantity = (long)dbEntity.ReorderMinQuantity;


            return(retVal);
        }
예제 #4
0
		public static coreModel.InventoryInfo ToCoreModel(this webModel.InventoryInfo inventory)
		{
			var retVal = new coreModel.InventoryInfo();
			retVal.InjectFrom(inventory);
			return retVal;
		}