private void AddDatasetVote(int value, String itemKey) { var item = new Rate { RateValue = value, ItemKey = itemKey, RateDate = DateTime.Now, User = CurrentUser, }; RatingRepository.AddVote(item); }
public static void AddVote(Rate item) { RateDataSource rateDS = new RateDataSource(); DatasetInfoDataSource datasetInfoDS = new DatasetInfoDataSource(); rateDS.AddVote(new RateEntry() { RowKey = Guid.NewGuid().ToString(), ItemKey = item.ItemKey, PartitionKey = "rates", RateDate = item.RateDate, RateValue = item.RateValue, User = item.User, }); datasetInfoDS.IncrementVote(item.ItemKey, item.RateValue); }