Beispiel #1
0
 static void Main(string[] args)
 {
     string conexionMySql = ConfigurationManager.ConnectionStrings["efdemomysqlEntities"].ConnectionString;
     using (EFDemoEntities context = new EFDemoEntities())
     {
         List<Pais> paisesLatinos = (from p in context.Pais
                              select p).ToList();
     }
     using (EFDemoEntities context = new EFDemoEntities(conexionMySql))
     {
         List<Pais> paisesEuropeos = (from p in context.Pais
                              select p).ToList();
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            string conexionMySql = ConfigurationManager.ConnectionStrings["efdemomysqlEntities"].ConnectionString;

            using (EFDemoEntities context = new EFDemoEntities())
            {
                List <Pais> paisesLatinos = (from p in context.Pais
                                             select p).ToList();
            }
            using (EFDemoEntities context = new EFDemoEntities(conexionMySql))
            {
                List <Pais> paisesEuropeos = (from p in context.Pais
                                              select p).ToList();
            }
        }