示例#1
0
 public void CreateDB()
 {
     using (var db = new MyContext())
     {
         db.Database.EnsureCreated();
     }
 }
示例#2
0
 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();
     }
 }