Back to Devexpress

LinqServerModeDataSource.ContextTypeName Property

aspnet-devexpress-dot-data-dot-linq-dot-linqservermodedatasource-d2648728.md

latest2.1 KB
Original Source

LinqServerModeDataSource.ContextTypeName Property

Gets or sets the type name of objects retrieved from a data source.

Namespace : DevExpress.Data.Linq

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string ContextTypeName { get; set; }
vb
<DefaultValue("")>
Public Property ContextTypeName As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value that specifies the type name of objects retrieved from a data source.

|

Remarks

aspx
<dx:ASPxGridView ID="ASPxGridView1" DataSourceID="LinqServerModeDataSource1" >
    ...
</dx:ASPxGridView>

<dx:LinqServerModeDataSource ID="LinqServerModeDataSource1" runat="server" 
    ContextTypeName="NorthwindNestedFields.DataClasses1DataContext" TableName="Orders" />
csharp
namespace NorthwindNestedFields
{
    [System.Data.Linq.Mapping.DatabaseAttribute(Name="Northwind")]
    public partial class DataClasses1DataContext : System.Data.Linq.DataContext {
        private static System.Data.Linq.Mapping.MappingSource mappingSource = new AttributeMappingSource();
        ...
        public DataClasses1DataContext(string connection) : 
            base(connection, mappingSource)
        {
          OnCreated();
        }

See Also

LinqServerModeDataSource Class

LinqServerModeDataSource Members

DevExpress.Data.Linq Namespace