Devart Blog

SQL Generation

Entity Framework: SQL Generation Enhancements for IN Clause

Posted by on December 9th, 2010


Devart was the first company who shipped Entity Framework providers for Oracle, MySQL, PostgreSQL, SQLite. And now we remain the leader in supporting new versions and features of Entity Framework.

Continuing to improve support of Entity Framework v4 features, as it was described here, we have optimized generated SQL for our ADO.NET data providers – dotConnect for Oracle, dotConnect for MySQL, dotConnect for PostgreSQL, and dotConnect for SQLite.

SQL generation was significantly improved and simplified in Entity Framework 4. Most of these improvements can be used in third-party providers, but one aspect has been improved only for SqlClient. It is a conversion of IN expression in Entity SQL and Contains method for collections in LINQ to Entities.

New versions of our dotConnect implement this enhancement for both Entity Framework v4 and Entity Framework v1. Our EF v1 users can get optimized SQL for IN Entity SQL expressions, but LINQ to Entities doesn’t support Contains method for collections in EF v1.