All Questions
5 questions
2
votes
2
answers
160
views
How can I reuse the logic in a .Include.Where() call while working with Entity Framework Core in .NET?
I am writing a database query using LINQ in .NET and I want to be able to not duplicate the code I put in my Where method calls.
I want to return Blogs that have fresh Comments, and want to filter ...
2
votes
2
answers
2k
views
SELECT result map to entity in Dynamic Linq in Entity Framework Core
I have a Linq query which is selecting 2 columns(that can be any 2 from all columns) dynamically based on some condition.I need to map the query result in to below model irrespective of selected ...
0
votes
1
answer
4k
views
Dynamic Linq in Entity Framework Core
I need to create a Linq query having Where and Select both dynamic.I am searching something like below code which will work in .net core.
var result = myQuery
.Where("Field1=\"SomeValue\&...
4
votes
2
answers
3k
views
How to use expressions to build a LINQ query dynamically when using an interface to get the column name?
I'm using Entity Framework Core to store and retrieve some data. I'm trying to write a general-purpose method that will work on any DbSet<T> in order to avoid code duplication. This method runs ...
3
votes
0
answers
692
views
How to modify MemberBinding expression using Expression Visitor
I am trying to modify MemberBinding expression using Expression visitor. But I am getting an error when I try to compile the modified expression which says:
'variable 'source' of type 'EFTest.Views....