How does Entity Framework work in conjunction with DB Providers? RRS feed

  • Question

  • Hi,

    Here's my senario:
    I download a SQLite data provider, create project, add references.
    The I add a new edmx file, and in the add new connection step of the wizard, I change the data source to the SQLite data provider.
    Then I wrote some lines of code, and found that the output trace string of the ObjectQuery use the "limit" keyword. It seems that entity framework knows that I was using SQLite, so it use the SQLite-specific sql language. But the SQLite data provider is just a standard db provider. I don't think the sql strings are generated by the db provider, because we used to write the sql string ourselves, and then pass it to the DbCommand. But if the sql string is not generated by the db provider, who generated it? Entity framework? If it's entity framework, how does entity framework know what database I'm using?

    Thanks in advance.
    Friday, January 8, 2010 9:14 AM


  • Yeah, I know the answer now. The Entity Framework db provider not only implements the ado.net 2.0 db provider classes, but also some additional abstract classes, which are in the Entity Framework's assembly. :)
    Friday, January 8, 2010 4:44 PM