Skip to content

Commit bd9794d

Browse files
authored
Update DatatablesParser.cs
I was getting a System.Reflection.AmbiguousMatchException: 'Ambiguous match found.' on the "Contains" method which has multiple signatures. Adding in new[] { typeof(string) } specifies the right method, I believe. First pull request and contribution. Thanks. Nice work.
1 parent 769468d commit bd9794d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DatatablesParser/DatatablesParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private Expression<Func<T, bool>> GenerateEntityFilter()
323323

324324
if(globalFilterConst!=null)
325325
{
326-
var globalTest = Expression.Call(toLower, typeof(string).GetMethod("Contains"), globalFilterConst);
326+
var globalTest = Expression.Call(toLower, typeof(string).GetMethod("Contains", new[] { typeof(string) }), globalFilterConst);
327327

328328
if(filterExpr == null)
329329
{
@@ -337,7 +337,7 @@ private Expression<Func<T, bool>> GenerateEntityFilter()
337337

338338
if(individualFilterConst!=null)
339339
{
340-
individualConditions.Add(Expression.Call(toLower, typeof(string).GetMethod("Contains"), individualFilterConst));
340+
individualConditions.Add(Expression.Call(toLower, typeof(string).GetMethod("Contains", new[] { typeof(string) }), individualFilterConst));
341341

342342
}
343343

0 commit comments

Comments
 (0)