Closed JonathanMagnan closed 1 year ago
Hello @szavoda,
You currently using a method of EF Plus. However, C# Eval is not aware of our third-party library.
You need to register the method to use IncludeFilter
in a dynamic expression.
You can register all methods of EF Plus using the following code:
EvalManager.DefaultContext.RegisterAssembly(typeof(Z.EntityFramework.Plus.Audit).Assembly);
After registering the assembly, you will now be able to use your code successfully.
Best Regards,
Jon
Hi @JonathanMagnan
I tried adding the statement, but it gave the same results. I placed it as the last statement in the program startup before the App.Run as well as a few other positions, but with the same results.
Thanks for the help!
Shawn
Hello @szavoda ,
Here is an online example created by my developer: https://dotnetfiddle.net/yQVJyk
Could you try to reproduce the issue if you still have it after looking at this example?
Best Regards,
Jon
@JonathanMagnan -
I believe that there has to be something else wrong with my implementation specifically. I am able to the the IncludeFilter dynamically against other entities - it is only when I attempt to include the "Payment" Entity that I get the error. I am going to start to tear this down to the basics and see if I can locate my issue.
As a side note, I am able to use the IncludeFilter dynamically without registering the assembly on the other entities that are working.
Hello @szavoda
Any update on your issue?
Let me know if you need further assistance.
Best regards,
Jon
Hi - I am going to be tackling this some more today. The only difference between my entities and the ones that work that I can see so far is that I am using SQL Temporal Tables. I will be trying to recreate in our project and then try to move to a shared project for your team.
Thanks!
Shawn
Hello @szavoda
Unfortunately, since we didn't hear from you I will close this issue.
As previously mentioned, we need a runnable project to be able to assist you.
We will reopen the issue if a project is received.
Feel free to contact us for questions, issues or feedback.
Best Regards,
Jon
Here is what to include in your request to make sure we implement a solution as quickly as possible.
1. Description
Trying to execute the following code:
and I receive an error that the IncludeFilter is ambiguous. When the same code is used outside of the Execute (directly against the DBSet), it works. IncludeFilter on other entities also works with Execute. Additionally, Where with the Payments entity also works using Execute.
2. Exception
Exception message: "Oops! Ambiguous match found for: 'IncludeFilter'. The error occurred for expression \".\" at position 140 near \".IncludeFilter(x => x.Pay\".",
Stack trace:
4. Any further technical details
.NET Core 6
Original Post: https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/708