Exemplo n.º 1
0
 public Form2()
 {
     InitializeComponent();
     db = new PlanetContext();
     db.Planet.Load();
     dataGridView1.DataSource = db.Planet.Local.ToBindingList();
 }
Exemplo n.º 2
0
 private List <Planet> GetDP()
 {
     using (var db = new PlanetContext())
     {
         var planets = db.Planet.ToList();
         return(planets);
     }
 }