I have one queryable... where I have used various ...Where... and ...WhereBetween... statements to narrow the collection down to a certain set. Now ...I need to add kind of a ...Where || WhereBetween.... In other words, I can't just chain them together li...
I have a Linq provider that sucessfully goes and gets data from my chosen datasource, but what I would like to do now that I have my filtered resultset, is allow Linq to Objects to process the rest of the Expression tree (for things like Joins, projection...
Can anybody explain me how to use (1) iQueryable (2) Expression Tree in C# by providing a very basic example? Both are not correlated, instead of making two separate questions, I wish to clear my doubt in a single question....Advanced Thanks.
At point (3) in my code I have defined a query called query1 in which I defined a .Where lambda expression. This query is in some way dynamic but still contains static elements, it always refers to the Type Employee and its (int) property ClientID. ...Now...
I have a set of search criterias in this form:... member | value | operator
--------+---------+---------
height | 10 | >
height | 2 | <
name | Carl | ==
...And I want to query all the objects that match any of these cri...
I have a query, like such:...var query = from sessions in dataSet
where (names.Contains(sessions.Username))
where (sessions.Login.TimeOfAction == dt)
select new { sessions....
I'm using Entity Framework 4.1 Code First. In my entity, I have three date/time properties:...public class MyEntity
{
[Key]
public Id { get; set; }
public DateTime FromDate { get; set; }
public DateTime ToDate { get; set; }
[NotMap...
When working with ...IQuerayble<TItem>... we can call ...Select... like this:...query.Select( item => new { A=item.Prop1, B=item.Prop2});
...And ...Select... method expects ...Expression<Func<TItem,TResult>>...I need to use ...ExpandoObject... instead of ...
Is there any way to apply a manually created expression tree from one IQueryable to another? For example:...IQueryable<string> p = Enumerable.Empty<string>().AsQueryable();
p = p.Where(pp => pp[0] == 'A');
p = p.Skip(2).Take(4);
p = p.OrderBy(pp => pp.Len...
I have following generic queryable (which may already have selections applied):...IQueryable<TEntity> queryable = DBSet<TEntity>.AsQueryable();
...Then there is the ...Provider... class that looks like this:...public class Provider<TEntity>
{
public E...
Piggybacking off of a ...very similar question.........I need to generate an ...Expression... from a ...ViewModel... to pass as a search predicate for ...IQueryable.Where.... I need to be able to include/exclude query parameters based on what is provided ...