public static coreModel.InventoryInfo ToCoreModel(this webModel.InventoryInfo inventory) { var retVal = new coreModel.InventoryInfo(); retVal.InjectFrom(inventory); return(retVal); }
/// <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; }
/// <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); }
public static coreModel.InventoryInfo ToCoreModel(this webModel.InventoryInfo inventory) { var retVal = new coreModel.InventoryInfo(); retVal.InjectFrom(inventory); return retVal; }