Back to Devexpress

LinqServerModeDataSourceSelectEventArgs.QueryableSource Property

aspnet-devexpress-dot-data-dot-linq-dot-linqservermodedatasourceselecteventargs-8616fac5.md

latest1.8 KB
Original Source

LinqServerModeDataSourceSelectEventArgs.QueryableSource Property

Gets or sets the queryable data source.

Namespace : DevExpress.Data.Linq

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public IQueryable QueryableSource { get; set; }
vb
Public Property QueryableSource As IQueryable

Property Value

TypeDescription
IQueryable

An object that implements the IQueryable interface.

|

Example

The following example illustrates how to use the LinqServerModeDataSourceSelectEventArgs.QueryableSource property.

csharp
protected void EntityServerModeDataSource1_Selecting(object sender, DevExpress.Data.Linq.LinqServerModeDataSourceSelectEventArgs e) {
    var db = new YourDataContext();
    e.KeyExpression = "ID_FIELD_FROM_YOUR_TABLE";
    e.QueryableSource = db.Products;
    //or
    e.QueryableSource = db.Products.Where(p=>p.Price > 10);
    //or other linq query
}

See Also

KeyExpression

LinqServerModeDataSourceSelectEventArgs Class

LinqServerModeDataSourceSelectEventArgs Members

DevExpress.Data.Linq Namespace