© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
9 replies
Johnny 🌸

Linq Where JsonSerialization not working

Hey, is there a way to get the following running:
dbSet.Set<Table>().Where(x => JsonSerializer.Deserialize<Object>(x.Value).Number1 == localGivenNumber).ToList();
dbSet.Set<Table>().Where(x => JsonSerializer.Deserialize<Object>(x.Value).Number1 == localGivenNumber).ToList();


I am getting the error an expression tree cannot contain a call or invocation that uses optional arguments
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JsonSerialization Help
C#CC# / help
2y ago
System.InvalidOperationException: The LINQ expression 'DbSet<WorkingTask>() .Where(w => new Work
C#CC# / help
2y ago
Linq Concat not defined?
C#CC# / help
4y ago