Fazer uma PerguntaFazer uma Pergunta
 

RespondidoEntity Framework ODBC support

  • sexta-feira, 17 de outubro de 2008 10:41reniite Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Planning to use EF, so looking for different information, EF advantages and disadvanteges.

    One of my questions is: Does EF support ODBC connection?

Respostas

  • sexta-feira, 17 de outubro de 2008 14:32Jaroslaw Kowalski - MSFTModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    EF v1 has no direct support for OdbcConnection (in current release Microsoft ships EF-compatible providers for SQL Server and SQL Compact).

     

    The reason for that is that EF requires the provider to supply metadata describing store types, built-in functions and primitive type mapping information - something that's not available through ODBC layer. There are also differences in SQL syntax supported by databases and the provider would have to compensate for those differences - again ODBC doesn't have enough information to do this in a general way.

     

    If you want to target a specific database which has ODBC driver available, you can create EF-compatible provider by using the wrapping technique demonstrated in EF Sample Provider and EF Oracle Provider samples on MSDN Code Gallery.

     

Todas as Respostas

  • sexta-feira, 17 de outubro de 2008 14:32Jaroslaw Kowalski - MSFTModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    EF v1 has no direct support for OdbcConnection (in current release Microsoft ships EF-compatible providers for SQL Server and SQL Compact).

     

    The reason for that is that EF requires the provider to supply metadata describing store types, built-in functions and primitive type mapping information - something that's not available through ODBC layer. There are also differences in SQL syntax supported by databases and the provider would have to compensate for those differences - again ODBC doesn't have enough information to do this in a general way.

     

    If you want to target a specific database which has ODBC driver available, you can create EF-compatible provider by using the wrapping technique demonstrated in EF Sample Provider and EF Oracle Provider samples on MSDN Code Gallery.