public void CreateDB() { using (var db = new MyContext()) { db.Database.EnsureCreated(); } }
public void AddANewNote(Note NewNote) { using (var db = new MyContext()) { db.Database.EnsureCreated(); //Note Newnote = new Note(); //Newnote.Description = "Notes related to panel drawings, OH MY"; db.Notes.Add(NewNote); db.SaveChanges(); } }