public List <Models.Note> Get() { NotesDBContext db = new NotesDBContext(); var NotesList = db.Notes.ToList(); return(NotesList); }
public Boolean DeleteNote(int id) { NotesDBContext db = new NotesDBContext(); Note note = db.Notes.Find(id); db.Notes.Remove(note); db.SaveChanges(); return(true); }
public Boolean AddNote(string title, string desc) { NotesDBContext db = new NotesDBContext(); Models.Note note = new Note(); note.Title = title; note.Desc = desc; db.Notes.Add(note); db.SaveChanges(); return(true); }
public NoteRepository(NotesDBContext context) { _context = context; }
public NotesController(NotesDBContext context) { this.context = context; }
public NotesService(NotesDBContext context) { _context = context; }
public NotesRepository(NotesDBContext context) { this._context = context; }