ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Filter Data in Grid - getting System.AggregateException
Title:
B
I
{code}
?
I am following code as per this link: https://demo.aspnetawesome.com/GridFilterRowServerSideData but getting below exception. Any ideas? System.AggregateException HResult=0x80131500 Message=One or more errors occurred. (The LINQ expression 'DbSet<Catalogue> .Where(c => c.RetailerName.Contains( value: __banner_0, comparisonType: OrdinalIgnoreCase))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.)
Save Changes
Cancel
JB
asked at 28 Sep 2021
Answers
B
I
{code}
?
In most of our demos we use a client fake DB ( a static list of objects ), so the queries are a bit different to what a real DB query might look like, SQL Server is by default case insensitive so you don't need `OrdinalIgnoreCase`, also EF can't translate that into SQL (as the error message says) You can have a look at our SQL EF demo here: https://www.aspnetawesome.com/Download/AweSql In your case it is likely that all you need to do is remove the `OrdinalIgnoreCase` parameter
Save Changes
Cancel
Omu
answered at 28 Sep 2021
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK