Configuring Entity Developer for Executing Queries

In order to execute LINQ, HQL, and Entity SQL queries against the model, Entity Developer must generate model code, compile it, and link the corresponding ORM runtime. It is done automatically when designing ORM Models in Visual Studio, in projects targeting Full .NET Framework, because ORM runtime is already linked to the project and all the necessary paths are specified.

Manual Entity Developer configuration is required in the following cases:

If you design models in the standalone Entity Developer application;
If you design Entity Framework Core models in Visual Studio, in projects, targeting .NET Core or .NET Standard.

For LINQ to SQL, Entity Framework, or LinqConnect, no additional steps are required because these ORMs are either preinstalled with the .NET Framework or registered system-wide when installed. For NHibernate, Entity Framework Core, and Telerik Data Access you need to specify the necessary paths manually.

 

ExpandedToggleIcon        NHibernate

For NHibernate you need to specify the path to NHibernate assemblies in Entity Developer options. For this perform the following steps:

1.On the Tools menu, click Options.
2.In the Options dialog box, in the tree on the left, expand the General node and click NHibernate.
3.In the NHibernate assemblies folder box, specify the path to NHibernate assemblies, or click Browse and browse for the necessary path.

You can download necessary assemblies on NHibernate website.

 

ExpandedToggleIcon        Entity Framework Core

For Entity Framework Core, you need to specify the path to Entity Framework Core runtime assemblies. This path must be specified in the Entity Developer config file, that is located in the Common Files folder, not in the installation path. By default this file is located by the following path:

On 32-bit Windows: "C:\Program Files\Common Files\Devart\EntityDeveloper\EntityDeveloper.exe.config"

On 64-bit Windows: "C:\Program Files (x86)\Common Files\Devart\EntityDeveloper\EntityDeveloper.exe.config"

Open this file in any text editor. This is an XML file. You need to specify the path to Entity Framework Core runtime assemblies in the core-assemblies-path attribute of the EFCore element.

Required Assemblies

The necessary Entity Framework Core files are added to your Visual Studio solution folder when you install the required NuGet packages of Entity Framework Core and Entity Framework Core providers to this solution. After you add these packages, you can find the necessary unpacked files in your solution folder (.NET Framework) or in C:\Users\%UserName%\.nuget\packages\ (.NET Core). Entity Developer requires the following Entity Framework Core assemblies:

Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Relational
Microsoft.Extensions.Primitives
Microsoft.Extensions.Options
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.Extensions.Logging
Microsoft.Extensions.Logging.Abstractions
Microsoft.Extensions.Caching.Abstractions
Microsoft.Extensions.Caching.Memory
System.Diagnostics.DiagnosticSource
System.Collections.Immutable
System.Interactive.Async
Remotion.Linq
for Entity Framework Core 2.0 - System.ComponentModel.Annotations
for Entity Framework Core 2.0 - Microsoft.Extensions.Configuration.Abstractions
for Entity Framework Core 2.2 - Microsoft.EntityFrameworkCore.Abstractions

Additionally Entity Developer requires assemblies of a data provider used for data access via Entity Framework Core. For dotConnect data providers it requires the following assemblies: Devart.Data.dll, Devart.<database>.dll, Devart.<database>.Entity.EFCore.dll, where <database> is the name of the corresponding DBMS. For third-party providers, Entity Developer requires the following assemblies:

SqlClient - the Microsoft.EntityFrameworkCore.SqlServer assembly is required
SQL Server Compact - the EntityFrameworkCore.SqlServerCompact40 or EntityFrameworkCore.SqlServerCompact35 assembly is required, depending on the SQL Server Compact version.
Microsoft.Data.SQLite - this provider uses its own SQLite engine. You need to place its SQLite libraries to the folder of your application to subfolders: \x64\e_sqlite3.dll - 64bit library and \x86\e_sqlite3.dll - 32bit library. Besides, the following assemblies are required:
oMicrosoft.EntityFrameworkCore.SQLite.dll
oMicrosoft.Data.Sqlite.dll
oSQLitePCLRaw.core.dll
oSQLitePCLRaw.batteries_green.dll
oSQLitePCLRaw.batteries_v2.dll
oSQLitePCLRaw.provider.e_sqlite3.dll
Npgsql - the NpgSql.EntityFrameworkCore.PostgreSQL and Npgsql assemblies are required.
IBM DB2 .NET Data Provider - the EntityFramework.IBMDataServer assembly is required.
MySQL Connector/Net - the MySql.Data.EntityFrameworkCore and MySql.Data assemblies are required.

Copy both common Entity Framework Core assemblies and required provider-specific assemblies to any folder you like, and specify the path in the Entity Developer config file as described above.

 

 

ExpandedToggleIcon        Telerik Data Access

For Telerik Data Access, you need to specify the paths to Telerik Data Access runtime assemblies and to the Telerik enhancer.exe utility that processes the assemblies, containing mapping classes, after compilation. These paths must be specified in the Entity Developer config file, that is located in the Common Files folder, not in the installation path. By default this file is located by the following path:

"C:\Program Files\Common Files\Devart\EntityDeveloper\EntityDeveloper.exe.config"

Open this file in any text editor. This is an XML file. You need to specify the path to Telerik Data Access runtime assemblies in the assemblies-path attribute of the DataAccess element, and the path to the enhancer.exe utility - in the enhancer-path attribute of the DataAccess element.

The necessary Telerik Data Access files are added to your Visual Studio solution folder when you install the Telerik.DataAccess.Fluent NuGet package to this solution. After you add this package, you can find the necessary unpacked files in your solution folder. For example, if your solution is stored in the C:\Projects\WindowsFormsApplication1\ folder, you can find the runtime file in the c:\Projects\WindowsFormsApplication1\packages\Telerik.DataAccess.Core.2015.3.1221.1\lib\net20 folder (for .NET Framework 2.0) or in the c:\Projects\WindowsFormsApplication1\packages\Telerik.DataAccess.Core.2015.3.1221.1\lib\net40 folder (for .NET Framework 4.0). The enhancer utility can be found by the following path: c:\Projects\WindowsFormsApplication1\packages\Telerik.DataAccess.Fluent.2015.3.1221.1\tools\enhancer\enhancer.exe . Please note that the version of Telerik Data Access, used in this example (2015.3.1221.1), may differ from the version you use.

Copy these files to any folder you like, and specify the paths in the Entity Developer config file as described above.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.