The latest ADO.NET evolution focuses on raising the level of abstraction from the logical (relational) level to the conceptual (entity) level. For this purpose Microsoft introduces the Entity Framework, designed to simplify data - object conversion and embed data access queries into program code.
The Devart dotConnect product line supports the ADO.NET Entity Framework for Oracle, MySQL, PostgreSQL, SQLite, and Salesforce.
The article consists of the following sections:
The Entity Framework is a set of technologies in ADO.NET that support development of data-oriented software applications. The Entity Framework is designed to enable developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits:
Use of dotConnect for MySQL in the Entity Framework is similar to use of standard SqlClient. Generally it conforms to the following scheme:
For your convenience there is a brief Entity Framework Tutorial that you can use to get acquainted with the technology. You can also take a look at Entity Framework samples available with the product, or download separate Entity Framework Query Samples package. The latter is a standard Microsoft demo with added MySQL connectivity.
When deploying Entity Framework projects, it is necessary to:
<system.data> <DbProviderFactories> <remove invariant="Devart.Data.MySql" /> <add name="dotConnect for MySQL" invariant="Devart.Data.MySql" description="Devart dotConnect for MySQL" type="Devart.Data.MySql.MySqlProviderFactory, Devart.Data.MySql, Version=18.104.22.168, Culture=neutral, PublicKeyToken=09af7300eec23701" /> </DbProviderFactories> </system.data>
Replace 22.214.171.124 here with your actual version.
If you are registering the provider in the machine.config file, please take into account the Entity Framework version. Entity Framework v1 - specific applications require an entry in the .NET Framework 2.0 configuration file, and Entity Framework v4 - specific applications should be registered in the .NET Framework 4.0 configuration file.
You can also read Micrsoft's Deployment Considerations on ADO.NET Entity Framework.
dotConnects for MySQL, Oracle, PostgreSQL, and Salesforce are tightly integrated with Visual Studio Entity Data Model Wizard for generating model definitions. dotConnects also include several demo projects that show how to use the product in conceptual programming against data.
dotConnects for Oracle, MySQL, PostgreSQL, and SQLite are compatible with the latest version of ADO.NET Entity Framework and Visual Studio. The following server versionis are required for Entity Framework to function properly:
To migrate your ADO.NET Entity Data Model to Devart Entity Model, change the extension of the model file to edml (edmx -> edml), set the Build Action property of your model to "DevartEntityDeploy", and Custom Tool to "DevartEfGenerator". After that the model can be edited with the Devart Entity Developer.
To migrate your Devart Entity Model to ADO.NET Entity Data Model, change the model file extension (edml ->edmx), set the Build Action property of your model to "EntityDeploy", and Custom Tool to "EntityModelCodeGenerator". After that the model can be edited with Entity Designer.
Both *.edml and *.edmx can be opened and edited manually using XML Editor.
© 2002-2013 Devart. All rights reserved.