The type or namespace name 'DynamicQueryEngine' could not be found

Posts   
 
    
Posts: 61
Joined: 14-Feb-2017
# Posted on: 05-Sep-2019 10:14:28   

Hi,

LLBLGEN : 5.6 Database : Oracle

When I generate entities, the following using is missing : using SD.LLBLGen.Pro.DQE.Oracle; so the following error occurs : "The type or namespace name DynamicQueryEngine could not be found" so I need to include it manually each time I generate the source code.

Attachments
Filename File size Added on Approval
1.png 8,640 05-Sep-2019 10:14.50 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 05-Sep-2019 10:48:20   

which template group and in which file is it missing? We generate code for all databases and compile that in automated tests and they all succeed. Please provide steps to reproduce this.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 61
Joined: 14-Feb-2017
# Posted on: 05-Sep-2019 15:31:13   

Hi,

File : DataAcccessAdapter.cs Template Group : Adapter Target Language : C# Target Platform : .NET Standard 2.0

Attachments
Filename File size Added on Approval
1.png 5,215 05-Sep-2019 15:31.51 Approved
2.png 25,125 05-Sep-2019 15:31.55 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 05-Sep-2019 16:09:56   

This is to be expected, as MS Oracle is the System.Data.Oracle ADO.NET provider which isn't supported on .NET Standard, but is on .NET Framework. So you shouldn't choose .NET Standard as target platform, but .NET 4.5.2 or higher.

So the code generates for .net standard, but the DQE isn't available on .NET standard. If you're planning to use the generated code on .NET Core, please switch to the ODP.NET provider. This isn't a simple switch, as MS Oracle has the side effect that all NUMBER(x, y) types are System.Decimal, so you have to refetch the relational model data using ODP.NET. ODP.NET is supported on .NET core and therefore is supported on .NET Standard.

If you're planning to use the generated code on .NET Framework, then please select the .NET framework of choice, e.g. .NET 4.5.2.

Please explain what you're planning to do: use it on .net core or use it on .net framework so we can advice you what to do next.

(In general you shouldn't pick MS Oracle as your ADO.NET provider for Oracle as Microsoft has deprecated System.Data.Oracle several years ago and doesn't add new features to it. Instead use the latest ODP.NET managed provider from Oracle itself)

Frans Bouma | Lead developer LLBLGen Pro
Posts: 61
Joined: 14-Feb-2017
# Posted on: 06-Sep-2019 10:03:03   

I target .NET Core. I follow your advice and switched to the ODP .NET Provider => all is fine now.

Thank you.