Exemplo n.º 1
0
 private void ConnectToDatabase()
 {
     try
     {
         var db = new NORTHWNDEntities();
         Console.WriteLine("Connecting NORTHWND.MDF");
         db.Database.Connection.Open();
         Console.WriteLine("Connected");
         var respiratory = new Respiratory(db);
         northWind = new NorthWind(respiratory);
         Console.WriteLine("Preparing database meta data");
         //Dummy query
         northWind.Products().Take(0);
         Console.WriteLine("Ready");
     }
     catch
     {
     }
 }