CreateSelectDQImpl Method not found

Posts   
 
    
mmelendez
User
Posts: 4
Joined: 13-Sep-2019
# Posted on: 13-Sep-2019 23:04:58   

Hello,

Yesterday we upgraded to v5.6, or some simple fetching and save entity collection operations, in a .Net Core project.

We use the following code for fetching:


            EntityCollection<FormatoElementoEntity> formatoElementos = new EntityCollection<FormatoElementoEntity>();
            IRelationPredicateBucket bucket = new RelationPredicateBucket();
            bucket.PredicateExpression.Add(FormatoElementoFields.IdFormato == entidad.IdFormato);
            using (DataAccessAdapter adapter = new DataAccessAdapter())
            {
                adapter.FetchEntityCollection(formatoElementos, bucket);
            }

And in the FetchEntityCollection method, we are getting this error:

Method not found: 'SD.LLBLGen.Pro.ORMSupportClasses.IRetrievalQuery SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQImpl(SD.LLBLGen.Pro.ORMSupportClasses.QueryParameters, System.Data.Common.DbConnection)'.

The StackTrace is:

at SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreatePagingSelectDQ(QueryParameters parameters, DbConnection connectionToUse) at SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(QueryParameters parameters, DbConnection connectionToUse) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.CreateSelectDQ(QueryParameters parameters) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.FetchEntityCollectionInternal(QueryParameters parameters) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.FetchEntityCollection(QueryParameters parameters) at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket) at mdc.Business.Mobile.Datos.RegistroDatos.Post(MdcFormData request, Int32 idequipo, String equipoUid) in D:\Desarrollo\MDC_V3\CODIGO\MDC_V3\MDC_API\MDC.Business\mdc.Business\Mobile\Datos\RegistroDatos.cs:line 124 at mdc.WebApi.Controllers.Mobile.Datos.MdcFormDataController.Post(JObject request) in D:\.....\MdcFormDataController.cs:line 92

** Before the upgrade, everything was working well.

How can we fix it? **

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 14-Sep-2019 10:54:01   

Please make sure you're referencing the v5.6 ORMSupportClasses and SQL Server DQE assemblies/packages.

It might be you do reference them in the generated code, but in your own application you're still referencing to an older version. It looks like at runtime the dqe looks like the new version but the ormsupportclasses dll is still an older version (e.g. the sqlserver dqe assembly is 5.6 and the ormsupportclasses dll is v5.3 or whatever older version you were using)

Frans Bouma | Lead developer LLBLGen Pro
mmelendez
User
Posts: 4
Joined: 13-Sep-2019
# Posted on: 17-Sep-2019 16:06:27   

Yes, we had not re-generated the code after the upgrade. We did that and it fixed most of the problems we had.

But after generating the code, we got a compilation error when using the Microsoft.SqlServer.Types DLL methods, since this is not compatible with .NET Core.

We tried several things but nothing work. At the end, we found that the SqlServerTypes was used for a geographic data column. We use that only in some Stored Procedures, not in the C# application, so we removed it from the LLBLGen project and we removed the Microsoft.SqlServer.Types DLL reference.

I am not proud of this solution (since it was not a solution, jeje), but it fixed the problem for now.

Thanks!

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Sep-2019 08:34:18   

mmelendez wrote:

We use that only in some Stored Procedures, not in the C# application, so we removed it from the LLBLGen project and we removed the Microsoft.SqlServer.Types DLL reference.

I am not proud of this solution (since it was not a solution, jeje), but it fixed the problem for now.

You did right. This is actually something documented here:

Documentation wrote:

The package Microsoft.SqlServer.Types, used for SQL Server spatial types in our own runtime framework doesn't have an equivalent that's usable on .NET Core. Therefore spatial types for LLBLGen Pro Runtime Framework on SQL Server are only supported on .NET Full.

David Elizondo | LLBLGen Support Team