public void RemoveRating(string name) { using (var db = new SudokuContext()) { db.Remove(db.Ratings.Single(c => c.Name == name)); db.SaveChanges(); } }
public void RemoveComment(string name) { //var sql="DELETE FROM Comment WHERE Name= {}" using (var db = new SudokuContext()) { db.Remove(db.Comments.First(c => c.Name == name)); db.SaveChanges(); } }