Beispiel #1
0
        public void Upsert(ObjectId categoryId, ObjectId[] productIds)
        {
            var ranking = GetByCategoryId(categoryId);
            if (ranking == null) {
                ranking = new RatioRanking();
                ranking.CategoryId = categoryId;
            }
            ranking.ProductIds = productIds;
            ranking.UpdateTime = DateTime.Now;

            Collection.Save(ranking);
        }
Beispiel #2
0
        public void Upsert(ObjectId categoryId, ObjectId[] productIds)
        {
            var ranking = GetByCategoryId(categoryId);

            if (ranking == null)
            {
                ranking            = new RatioRanking();
                ranking.CategoryId = categoryId;
            }
            ranking.ProductIds = productIds;
            ranking.UpdateTime = DateTime.Now;

            Collection.Save(ranking);
        }