Exemplo n.º 1
0
        public async Task <UserRate> DeleteAsync(UserRate userRate)
        {
            var deletedRate = context.UserRates.Remove(userRate).Entity;
            await context.SaveChangesAsync();

            //await Prediction.DeleteItemRateAsync(userRate.UserId, userRate.TitleId);

            return(deletedRate);
        }
Exemplo n.º 2
0
        public async Task <UserRate> UpdateAsync(UserRate userRate)
        {
            context.UserRates.Update(userRate);
            await context.SaveChangesAsync();

            //await Prediction.RateItemAsync(userRate.UserId, userRate.TitleId, userRate.Score);

            return(userRate);
        }
Exemplo n.º 3
0
        //+++ Update UserRate

        public UserRate Update(UserRate userRate)
        {
            context.UserRates.Update(userRate);
            context.SaveChanges();

            //Prediction.RateItem(userRate.UserId, userRate.TitleId, userRate.Score);

            return(userRate);
        }
Exemplo n.º 4
0
        //+++ Delete UserRate

        public UserRate Delete(UserRate userRate)
        {
            var deletedRate = context.UserRates.Remove(userRate).Entity;

            context.SaveChanges();

            //Prediction.DeleteItemRate(userRate.UserId, userRate.TitleId);

            return(deletedRate);
        }