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
, designed to simplify data - object conversion and embed data access queries
into program code.
dotConnect for MySQL fully supports ADO.NET Entity Framework, including Entity Framework Core.
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
package. The latter is a standard Microsoft
demo with added MySQL connectivity.
Since there are no global Entity Framework provider registration for Entity Framework v6,
you should register our provider manually in the config file of your project. For this you should add the following line:
<provider invariantName="Devart.Data.MySql" type="Devart.Data.MySql.Entity.MySqlEntityProviderServices,
Devart.Data.MySql.Entity.EF6, Version=8.3.215.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
to the
entityFramework -> providers
section.
<entityFramework>
<providers>
<provider invariantName="Devart.Data.MySql" type="Devart.Data.MySql.Entity.MySqlEntityProviderServices,
Devart.Data.MySql.Entity.EF6, Version=8.3.215.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</providers>
</entityFramework>
Note:
replace 8.3.215.0 with the actual assembly version.
If it suits for your project, you may omit the exact assembly version:
<entityFramework>
<providers>
<provider invariantName="Devart.Data.MySql" type="Devart.Data.MySql.Entity.MySqlEntityProviderServices, Devart.Data.MySql.Entity.EF6" />
</providers>
</entityFramework>
This section appears in the project config file only after you add the NuGet EntityFramework package either explicitly, by executing the "
install-package EntityFramework
" command, or implicitly, by adding an Entity Framework v6 model for SQL Server via EDM Wizard.