Vijay Kumar

Vijay Kumar

  • 1.6k
  • 71
  • 59.3k

Create dynamic where and select conditions

Jun 22 2016 5:21 AM

Hello guys ,

                   I need some solution to create a dynamic linq queries to get the data on the basis of dymanic where condition and select condition.

I use the Dynamic Linq (System.linq.dymanic) but I don't get any proper solution for related object (entity), And its work for single object when we go for multiple entity then it get some error for child entity.
 
So for more clearance I put some good example on it
 
var result = context.parent.child.where("parent_id = 100 and child_id = 304").select("new(parent_id,child.child_id)");
 
In that we have all the condition are in dynamic for where and select both
 
Thanks
 
 

Answers (1)