public void SaveRating(int jokeId, string userName, bool liked) { db.Ratings.Add(new Entities.Rating() { JokeId = jokeId, UserName = userName, Liked = liked, }); db.SaveChanges(); SaveCategoriesInOrder(userName); }
public void AddJokesToDb(List <Joke> jokes) { db.Jokes.AddRange(jokes); db.SaveChanges(); }