AmbiguousMatchException problem
See original GitHub issueHello @dbelmont, I have a problem, can you please check that.
It keeps giving me an AmbiguousMatchException
Steps to produce
-
Add
LambdaExpressionBuilder
nuget packages. It is important to use nuget package. It does not give any error when I try it with using project reference. Tried nuget package versions:2.0.1
,2.1.0-rc
, -
Try to create a simple filter, for example: (Tried on .netcore3.1)
public class TestClass
{
public int Id { get; set; }
}
class Program
{
static void Main(string[] args)
{
var filter = new Filter<TestClass>();
filter.By("Id", Operation.EqualTo, 1);// that line gives an error as seen below
}
}
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'ExpressionBuilder.Operations.Operation' threw an exception.
Source=ExpressionBuilder
StackTrace:
at ExpressionBuilder.Operations.Operation.get_EqualTo()
at test.Program.Main(String[] args) in D:\GitHub\ExpressionBuilder\test\Program.cs:line 16
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
TypeInitializationException: The type initializer for 'ExpressionBuilder.Helpers.OperationHelper' threw an exception.
Inner Exception 2:
TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception 3:
AmbiguousMatchException: Ambiguous match found.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Why am I getting AmbiguousMatchException: The request ...
When running the app, I get the error Microsoft.AspNetCore.Routing.Matching.AmbiguousMatchException: The request matched multiple endpoints
Read more >Type: System.Reflection.AmbiguousMatchException
Initializes a new instance of the AmbiguousMatchException class with a specified error message and a reference to the inner exception that is the...
Read more >NET 6.0 - AmbiguousMatchException ...
From your description, it sounds like the issue is inheritance. API Versions are not inherited out-of-the-box. This is by design. You cannot ...
Read more >the request matched multiple endpoints
NET MVC app I am getting following error: AmbiguousMatchException: The request matched multiple endpoints. Matches: RockWorld.Web.
Read more >What causes an AmbiguousMatchException
If your getting this error it probably means is that you have a case where it can't decide which overload to use in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found & fixed the problem but I screwed up the pull request. Perhaps somebody else can replicate my changes and do it properly.
In the meantime (because I needed a working version of this package), you may try my fork https://www.nuget.org/packages/Akinzekeel.ExpressionBuilder/
Thanks, it worked like a charm.