System.TypeLoadException

Posts   
 
    
lukerobb3
User
Posts: 2
Joined: 04-May-2020
# Posted on: 04-May-2020 04:10:53   

Iam getting this error and I can't find what I have done wrong.

System.TypeLoadException HResult=0x80131522 Message=Method 'GetEntityStaticMetaData' in type 'CDS.DataAccessLayer.EntityClasses.AddressEntity' from assembly 'CDS.DataAccessLayer, Version=1.0.7429.20516, Culture=neutral, PublicKeyToken=null' does not have an implementation. Source=CDS.Core.Repositories.Llblgen StackTrace: at CDS.Core.Repositories.Llblgen.ClienteleRepository.GetAllClienteles() in D:\mogo0604\gofreight\CDS.Core.Repositories.Llblgen\ClienteleRepository.cs:line 43 at CDS.Core.Services.ClienteleService.GetAllClienteles() in D:\mogo0604\gofreight\CDS.Core.Services\ClienteleService.cs:line 151 at CDS.PORTAL.ApiController.TestController.Get() in D:\mogo0604\gofreight\CDS.PORTAL\ApiController\TestController.cs:line 37 at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 04-May-2020 11:04:44   

You give no context info so I have no idea what I'm looking at. What's CDS?

Frans Bouma | Lead developer LLBLGen Pro
lukerobb3
User
Posts: 2
Joined: 04-May-2020
# Posted on: 05-May-2020 04:15:09   

Otis wrote:

You give no context info so I have no idea what I'm looking at. What's CDS?

CDS is just a name or prefix or the project name. I have two proejcts each for repository and service pattern. I made a data access layer.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 05-May-2020 09:07:59   

Hi there,

It's not enough context so understand your problem. We need more information, please look at these guidelines.

LLBLGen build version is a must; Did you generate code using Adapter or SelfServicing template set?, ... then your custom code that is in ClienteleRepository.GetAllClienteles() at ClienteleRepository.cs:line 43, from which the exception is triggered.

lukerobb3 wrote:

I have two proejcts each for repository and service pattern. I made a data access layer.

What do you mean when you say "I have two projects"? Are those the ones that LLBLGen generates (DBGeneric and DBSpecific) or do you mean two complete separate data access layer projects. Please clarify your solution setup.

Can you reproduce your situation from zero (new llblgen project, add entities, generate code, add your custom test code and receive the same error)?

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 05-May-2020 10:28:50   

It looks like the entity class code is generated with a version that's not the same as the ormsupportclasses dll used (the latter is newer). You have to regenerate the code if you use the latest ormsupportclasses dll. If you pulled it from nuget, install the one which matches the version of your generated code.

Frans Bouma | Lead developer LLBLGen Pro