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); }
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); }
//+++ Update UserRate public UserRate Update(UserRate userRate) { context.UserRates.Update(userRate); context.SaveChanges(); //Prediction.RateItem(userRate.UserId, userRate.TitleId, userRate.Score); return(userRate); }
//+++ Delete UserRate public UserRate Delete(UserRate userRate) { var deletedRate = context.UserRates.Remove(userRate).Entity; context.SaveChanges(); //Prediction.DeleteItemRate(userRate.UserId, userRate.TitleId); return(deletedRate); }