I saw the other thread entitled "Dynamic Linq" (http://www.telerik.com/community/forums/orm/linq-questions/dynamic-linq.aspx
), but the syntax just did not work for me. When I try a where(), there is no overloaded version that takes a string parameter. Am I missing a reference?
This is how our queries are formatted, and they do work:
scope = ProfitabilityScopeProvider.ObjectScope();
var branchItems = from basedata in scope.Extent<Ge.Wf.Profitability.Data.BaseData>()
where basedata.BranchNumber == 1234
But I'd like to use a string for the where clause for more dynamic queries, like is sampled in the examples in the link above. I tried to modify my query to look like the example from Alexander (of Telerik), but the parameters expected by the where() always include something called a Linq Expressions Predicate. What do I need to do to make the following work? Or better yet, in the format above, but with a string for the where clause.
var branchItems = scope.Extent<Ge.Wf.Profitability.Data.BaseData>()
.Where("basedata.Branchname == @0", 1234);