Back to Devexpress

EntityServerModeDataSource Class

aspnet-devexpress-dot-data-dot-linq-a74b6a42.md

latest5.0 KB
Original Source

EntityServerModeDataSource Class

A data source that can be associated with the Entity Framework source.

Namespace : DevExpress.Data.Linq

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class EntityServerModeDataSource :
    DataSourceControl
vb
Public Class EntityServerModeDataSource
    Inherits DataSourceControl

Remarks

The EntityServerModeDataSource component allows you to bind the ASPxCardView, ASPxGridView, ASPxVerticalGrid, ASPxComboBox and ASPxPivotGrid controls to a data source via the Entity Framework , and enable the database server mode. To do this, follow the steps listed below:

Important

To use the Server Mode with Entity Framework 6+, it is necessary to use special options on the application startup. To learn more, see the Knowledge Base Article: Is it possible to use the Entity Framework 6 and Server Mode together.

Online Demos

Web Forms:

MVC:

Example

The following example illustrates how to use the EntityServerModeDataSource component.

csharp
<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" KeyFieldName="ID" Width="100%" 
    DataSourceID="EntityServerModeDataSource">
</dx:ASPxGridView>
<dx:EntityServerModeDataSource ID="EntityServerModeDataSource" runat="server" 
    ContextTypeName="DevExpress.Web.Demos.LargeDatabaseContext" TableName="Emails" />

Implements

IComponent

IDisposable

IParserAccessor

IUrlResolutionService

IDataBindingsAccessor

IControlBuilderAccessor

IControlDesignerAccessor

IExpressionsAccessor

IDataSource

IListSource

Inheritance

Object Control DataSourceControl EntityServerModeDataSource

See Also

EntityServerModeDataSource Members

ASPxGridView

Bind Grid View to Large Data (Database Server Mode)

ASPxPivotGrid

Database Server Mode

LinqServerModeDataSource

DevExpress.Data.Linq Namespace