public bool Delete(int noteId) { SovaContext db = new SovaContext(); var note = db.Notes.Find(noteId); if (note == null) { return(false); } db.Remove(note); db.SaveChanges(); return(true); }
public bool DeleteMarking(int markingId) { SovaContext db = new SovaContext(); var marking = db.Markings.Find(markingId); if (marking == null) { return(false); } db.Remove(marking); db.SaveChanges(); return(true); }