//Delete public void DeleteReviewerById(int id) { Reviewer reviewer = _db.Reviewers.Find(id); _db.Reviewers.Remove(reviewer); _db.SaveChanges(); }
//Update public void UpdateReviewers(Reviewer reviewer2) { Reviewer reviewer1 = _db.Reviewers.Find(reviewer2.Id); reviewer1.Name = reviewer2.Name; reviewer1.Comment = reviewer2.Comment; reviewer1.Rating = reviewer2.Rating; _db.SaveChanges(); }
//Create Reviewer public void CreateReviewer(Reviewer reviewer) { _db.Reviewers.Add(reviewer); _db.SaveChanges(); }