-
I'm using CSLA 5.5.3 and .Net 7. I have a Fetch method that is defined like this:
I then call this method with For some reason CSLA can't find the Fetch method and throws an exception :
If I remove the [Inject] parameter the DataPortal can find my method just fine. Should I be injecting dependencies in another way? How can I fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
One note is that I have multiple Fetch methods with different criteria parameters. |
Beta Was this translation helpful? Give feedback.
-
Maybe the following needs to be on Server project on Programs.cs builder.Services.AddTransient(typeof(DataAccess.IXXXXDal), typeof(DataAccess.EF.XXXXEFDal)); |
Beta Was this translation helpful? Give feedback.
-
This was solved by adding this line to the Program.cs For some reason CSLA wasn't picking up the service provider. |
Beta Was this translation helpful? Give feedback.
This was solved by adding this line to the Program.cs
ApplicationContext.DefaultServiceProvider = services.BuildServiceProvider();
For some reason CSLA wasn't picking up the service provider.