Questions tagged [iqueryable]

.NET Framework Interface, providing functionality to evaluate queries against a specific data source wherein the type of the data is not specified.

The IQueryable interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement IQueryable(Of T). If the provider does not also implement IQueryable(Of T), the standard query operators cannot be used on the provider's data source.

The IQueryable interface inherits the IEnumerable interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an IQueryable object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the Execute method is called.

http://msdn.microsoft.com/en-us/library/system.linq.iqueryable.aspx

1457 questions
-1
votes
1 answer

SQL to IQueryable

I have SQL text query. I not want to use linq, it will be complicated linq. How to get IQueryable expression from my SQL string, which i can use in other linq queries? I want to get something like this: public class ElementCount { public int…
Denis Fedak
  • 161
  • 12
-1
votes
1 answer

Why do we need to avoid using IQueryable directly in an ASP.NET MVC view?

I'm being told that putting a direct reference to IQueryable from an ASP.NET MVC view is a bad practice but I have not found any clear explanation for that. Some might have experienced a "disposed object" error when accessing an IQueryable or a…
-1
votes
2 answers

Determine IQueryable column type based on name

I have an iQueryable dataset. I wish to be able to determine the type of data based on the name. I am doing a linq query into a view model and I wish to get the type of column by name from the resulting query
Dale Fraser
  • 4,623
  • 7
  • 39
  • 76
-1
votes
1 answer

IQueryable.Any wrapper. Method cannot be translated into a store expression

I have this code: public static bool ContainEx(this IQueryable query, System.Linq.Expressions.Expression> expression) { return query.Any(expression); } If I use that: return bonusesWhereSearch.WhereEx(x =>…
Glebka
  • 1,420
  • 3
  • 20
  • 37
-1
votes
1 answer

SUPER SIMPLE LINQ to filter row does not work

Spent about 4 hours trying to figure this out without success. IQueryable Infolist = userTOMs(); var rbtUserId = Infolist.Where(x => x.UserName == FormsUserName); userTOMs <-- Does not exist. Remade the namespace many times but…
-1
votes
1 answer

Creating a LINQ statement from this SQL to get the latest edit of each original record in the database

I'm creating a web application using MVC that allows users to edit existing records, and these are stored in the database as a new record that references the very first instance of said record. There's a column called "OriginalID" so when a video is…
-1
votes
1 answer

I have problems with using IQueryable

I have problems with IQueryable. What I want to do is write library that allows access to database. But first - in my database there are 3 tables - drivers, cars, tracks. And now how to make a class (or classes) that implements IQueryable and allows…
metal_man
  • 580
  • 1
  • 9
  • 22
-1
votes
2 answers

Using IQueryable data in Javascript

I am very new to Javascript and pretty much just plugging and playing with this example, but here it is at a high level. In my controller I am returning an Iqueryable to my view, which I then want to build a grid from. My javascript looks like…
Zach M.
  • 1,188
  • 7
  • 22
  • 46
-1
votes
1 answer

How can I get multiple data?

I can show just one customer, I know the problem is because I use FirstOrDefault in my LINQ. How can get another customer? I still don't understand the concept of IQueryable or IEnumerable. public int getNota(DateTime dt, int lap) { …
-1
votes
3 answers

iQueryable and Expression Tree

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.
user184805
  • 1,839
  • 4
  • 19
  • 16
-1
votes
1 answer

EF IQueryable extension method not working in Select

Possible Duplicate: LINQ to Entities does not recognize the method I use Entity Framework 4.3 I write extension method: public static IQueryable Active(this IQueryable source) where TSource : class, IStatusable { …
DeeRain
  • 1,344
  • 1
  • 15
  • 24
-2
votes
1 answer

LINQ: how to construct an IQueryable based on search criteria on the properties of the entity, including many-to-many-relationship

I struggled constructing and finding easily the correct info for defining the LINQ expressing for the criterion on the many-to-many, hence the Q&A. Please modify/improve/correct/... Basic situation: .Net Entity Framework code first We work with…
qqtf
  • 632
  • 6
  • 17
-2
votes
1 answer

What is best NoSQL for using Iqueryable in .Net?

I want to choose a NoSQL for ASP.NET Core for used to IQueryable. I try Mongo Db and Raven Db but that client's library don't support multi clause as IQueryable. for sample, I need a thing like snippet below code: query = query.Where(p =>…
Ali Taheri
  • 187
  • 2
  • 16
-2
votes
4 answers

create Linq orderby extension C#

I have the following code everywhere in the project and I was wondering if i can create a extension method on IQueryable that would cleanup the code in some places. I googled without any luck. this is part of the code for which i would like to…
patel.milanb
  • 5,822
  • 15
  • 56
  • 92
-2
votes
1 answer

IQueryable OrderBy by Equal

Is there a way to apply OrderBy on IQueryable starting by a specific value? Ex: I have this follow entity Name | Age | Type | Marcos | 15 | 1 | Andrew | 23 | 2 | Phelip | 18 | 2 | Jhonny | 14 | 3 | I've tried the following…