We have supported new functionality of Entity Framework 4 including Entity Framework v4 Release Candidate for dotConnect for Oracle, dotConnect for MySQL, dotConnect for PostgreSQL, and dotConnect for SQLite. In this article we consider basic new supported possibilities in comparison with Entity Framework v1. Take into account that the new features of Entity Framework v4 like Persistence Ignorance (POCO), Self-tracking entities, Code Only etc. which don’t require support of the provider writers aren’t described here.
EF run-time
New basic features of Entity Framework v4 Release Candidate run-time help you to create powerful database applications.
- DDL generation. Now you can generate and execute a DDL script with the help of the CreateDatabase(), DropDatabase(), and CreateDatabaseScript() methods. You can use this approach if you have a model.
- New canonical functions. More than thirty new canonical functions have been added for different data providers. We have supported new statistical and scalar functions.
- Translating String.StartsWith, String.EndsWith and String.Contains to LIKE in LINQ to Entities.
This functionality was successfully supported for Entity Framework v4 and Entity Framework v1. - Database-specific built-in functions in LINQ. Entity Framework v1 allows to define database-specific functions in provider manifest. These functions can be called with the help of Entity SQL. You can use these database-specific functions in LINQ in Entity Framework v4 with the help of a scalar method definition for every specific function. The classes representing aggregate and scalar-valued functions are described in the table below:
Connector | Assembly | Scalar-valued functions | Aggregate functions |
---|---|---|---|
dotConnect for Oracle | Devart.Data.Oracle.Entity.dll | OracleFunctions | OracleAggregateFunctions |
dotConnect for MySQL | Devart.Data.MySql.Entity.dll | MySqlFunctions | MySqlAggregateFunctions |
dotConnect for PostgreSQL | Devart.Data.PostgreSql.Entity.dll | PgSqlFunctions | PgSqlAggregateFunctions |
dotConnect for SQLite | Devart.Data.SQLite.Entity.dll | SQLiteFunctions | SQLiteAggregateFunctions |
For more information about dynamic database creation and canonical functions see articles Dynamic Database Creation in Entity Framework and Entity Framework Canonical Functions.
Visual Studio
Model First. This feature was partially supported in VS 2010. We have written T4-templates for dotConnect for Oracle, dotConnect for MySQL, dotConnect for PostgreSQL to work with it. So if you want to generate a DDL script just select an appropriate T4-template in model properties and define a connection string to the needed provider. The names of DDL-templates for data providers are presented in the table below:
Connector | DDL template name |
---|---|
dotConnect for Oracle | Devart SSDLToOracle.tt |
dotConnect for MySQL | Devart SSDLToMySql.tt |
dotConnect for PostgreSQL | Devart SSDLToPostgreSql.tt |
For more information about Model First see article Model First with Entity Framework 4.
Entity Developer
Designing Entity Framework v4 models was supported in Entity Developer and code generation was enhanced. ComplexTypes returned from stored procedures, and FK Properties and FK Assosiations were also supported.
See also: