-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this support netcoree 3.1? #45
Comments
I can't think of any reason why it wouldn't work. Did you import the NuGet package? |
Its error when I publish with every target build except portable |
The library is only one file. I suggest just copying the code into your project and see if it works. |
I see, Ill close it now. Thanks |
I ran into an issue with .NET Core 3.1. If using a boolean field in your filter, the conversion ToString() in the GenerateEntityFilter function will cause an exception as it cannot properly be translated on the server. I think it's caused by this issue: dotnet/efcore#14205 |
You can probably exclude Boolean from search so it won’t get added to the where clause. Do you search for strings “true” and “false”? |
I have boolean fields that need to be filtered so will have to find a workaround. It doesn't matter if I search for "true" and "false" or "0" and "1" (which worked in .NET Core 2.1). The ToString() function on a boolean will cause evaluation on the client. At least in my testing. You can try a where clause similar to .Where(x => x.boolField.ToString().Equals("true")) on the iQueryable before sending it to the DataTables Parser and it will produce the same exception. |
You can find another built-in function that will convert a Boolean to a string then put that in a UDF. Once that is done you can replace the .ToString() call on your Boolean fields with the call to the UDF. The Readme explains how to replace the .ToString() call. |
I got error
The type or namespace name 'DataTablesParser' could not be found (are you missing a using directive or an assembly reference?)
The text was updated successfully, but these errors were encountered: