Back to Devexpress

EntityServerModeSource.QueryableSource Property

corelibraries-devexpress-dot-data-dot-linq-dot-entityservermodesource-7d2e7fba.md

latest4.7 KB
Original Source

EntityServerModeSource.QueryableSource Property

Gets or sets the queryable data source.

Namespace : DevExpress.Data.Linq

Assembly : DevExpress.Data.v25.2.dll

NuGet Package : DevExpress.Data

Declaration

csharp
[DefaultValue(null)]
public IQueryable QueryableSource { get; set; }
vb
<DefaultValue(Nothing)>
Public Property QueryableSource As IQueryable

Property Value

TypeDefaultDescription
IQueryablenull

An object that implements the IQueryable interface.

|

Remarks

Use this property to supply a queryable source that is connected to the required data store. To see an example of using this property, refer to the Entity Framework 4.0+ Server Mode help topic.

The following code snippets (auto-collected from DevExpress Examples) contain references to the QueryableSource property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-pivotgrid-entity-framework-server-mode/CS/EntityFrameworkServerModeExample/Form1.cs#L21

csharp
context.Database.Log = Console.Write;
    entityServerModeSource.QueryableSource = context.EntityInvoices;
}

asp-net-web-forms-grid-entitydatasource-and-common-scenarios/CS/GridEntityFramework/ServerModeEF.aspx.cs#L32

csharp
EntityServerModeSource esms = new EntityServerModeSource();
esms.QueryableSource = DataContext.Products;
esms.KeyExpression = "ProductID";

connect-winforms-grid-to-backend-using-middletier-server/CS/WinForms.Client/MainForm.cs#L62

csharp
serverModeSource = new EntityServerModeSource() { ElementType = typeof(Employee), KeyExpression = "ID" };
serverModeSource.QueryableSource = dbContext.Employees;

winforms-pivotgrid-entity-framework-server-mode/VB/EntityFrameworkServerModeExample/Form1.vb#L16

vb
context.Database.Log = AddressOf Console.Write
    entityServerModeSource.QueryableSource = context.EntityInvoices
End Sub

asp-net-web-forms-grid-entitydatasource-and-common-scenarios/VB/GridEntityFramework/ServerModeEF.aspx.vb#L34

vb
Dim esms As EntityServerModeSource = New EntityServerModeSource()
esms.QueryableSource = DataContext.Products
esms.KeyExpression = "ProductID"

connect-winforms-grid-to-backend-using-middletier-server/VB/WinForms.Client/MainForm.vb#L37

vb
serverModeSource = New EntityServerModeSource() With {.ElementType = GetType(Employee), .KeyExpression = "ID"}
serverModeSource.QueryableSource = dbContext.Employees
gridControl.DataSource = serverModeSource

See Also

EntityServerModeSource Class

EntityServerModeSource Members

DevExpress.Data.Linq Namespace