MetaTable MetaTable MetaTable MetaTable Class

Definition

Represents the metadata that describes a table for use by Dynamic Data pages.

public ref class MetaTable
public class MetaTable
type MetaTable = class
Public Class MetaTable
Inheritance
MetaTableMetaTableMetaTableMetaTable

Examples

The following example is part of the code-behind file for the Insert.aspx page template. The MetaTable instance is initialized in the Page_Load method. The title for the page is set to the table DisplayName property.

public partial class Insert : System.Web.UI.Page {  
    protected MetaTable table;     

    protected void Page_Load(object sender, EventArgs e) {  
        table = DetailsDataSource.GetTable();  
        Title = table.DisplayName;  
    }  
}  
Partial Class Insert  
    Inherits System.Web.UI.Page  

    Protected table As MetaTable      

    Protected Sub Page_Load(ByVal sender As Object, _  
            ByVal e As EventArgs)  
        table = DetailsDataSource.GetTable  
        Title = table.DisplayName  
    End Sub  
End Class  

Constructors

MetaTable(MetaModel, TableProvider) MetaTable(MetaModel, TableProvider) MetaTable(MetaModel, TableProvider) MetaTable(MetaModel, TableProvider)

Initializes a new instance of the MetaTable class.

Properties

Attributes Attributes Attributes Attributes

Gets the attributes that are associated with the table.

Columns Columns Columns Columns

Gets the column collection for the table.

DataContextPropertyName DataContextPropertyName DataContextPropertyName DataContextPropertyName

Gets the name of the table.

DataContextType DataContextType DataContextType DataContextType

Gets the type of the data context that is associated with the table.

DisplayColumn DisplayColumn DisplayColumn DisplayColumn

Gets the column that is used to display values when entries in this table are used as parents in foreign-key relationships.

DisplayName DisplayName DisplayName DisplayName

Gets the name of the table in a user-friendly format.

EntityType EntityType EntityType EntityType

Gets the entity type that represents the table.

ForeignKeyColumnsNames ForeignKeyColumnsNames ForeignKeyColumnsNames ForeignKeyColumnsNames

Gets a comma-separated list of foreign-key names.

HasPrimaryKey HasPrimaryKey HasPrimaryKey HasPrimaryKey

Gets a value that indicates whether the table has a primary key.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

Gets a value that indicates whether the table is read-only.

ListActionPath ListActionPath ListActionPath ListActionPath

Gets the action path of the list action for the table.

Model Model Model Model

Gets the meta model that the table belongs to.

Name Name Name Name

Gets the unique name of the table.

PrimaryKeyColumns PrimaryKeyColumns PrimaryKeyColumns PrimaryKeyColumns

Gets the collection of columns that define the primary key.

Provider Provider Provider Provider

Gets the provider for the table.

RootEntityType RootEntityType RootEntityType RootEntityType

Gets the root type of the entity's inheritance hierarchy.

Scaffold Scaffold Scaffold Scaffold

Gets or sets a value that indicates whether the table should be displayed.

SortColumn SortColumn SortColumn SortColumn

Gets the MetaColumn value that the table is sorted by.

SortDescending SortDescending SortDescending SortDescending

Gets a value that indicates whether entries are sorted in descending order when they are used as parents in a foreign-key relationship.

Methods

BuildAttributeCollection() BuildAttributeCollection() BuildAttributeCollection() BuildAttributeCollection()

Creates the attribute collection.

CanDelete(IPrincipal) CanDelete(IPrincipal) CanDelete(IPrincipal) CanDelete(IPrincipal)

Gets a value that indicates whether the specified user is allowed to perform delete operations.

CanInsert(IPrincipal) CanInsert(IPrincipal) CanInsert(IPrincipal) CanInsert(IPrincipal)

Gets a value that indicates whether the specified user is allowed to perform insert operations.

CanRead(IPrincipal) CanRead(IPrincipal) CanRead(IPrincipal) CanRead(IPrincipal)

Gets a value that indicates whether the specified user is allowed to perform read operations.

CanUpdate(IPrincipal) CanUpdate(IPrincipal) CanUpdate(IPrincipal) CanUpdate(IPrincipal)

Gets a value that indicates whether the specified user is allowed to perform update operations.

CreateChildrenColumn(ColumnProvider) CreateChildrenColumn(ColumnProvider) CreateChildrenColumn(ColumnProvider) CreateChildrenColumn(ColumnProvider)

Creates a new MetaChildrenColumn object.

CreateColumn(ColumnProvider) CreateColumn(ColumnProvider) CreateColumn(ColumnProvider) CreateColumn(ColumnProvider)

Creates a MetaColumn object.

CreateContext() CreateContext() CreateContext() CreateContext()

Returns the data context for the table.

CreateForeignKeyColumn(ColumnProvider) CreateForeignKeyColumn(ColumnProvider) CreateForeignKeyColumn(ColumnProvider) CreateForeignKeyColumn(ColumnProvider)

Creates an object that contains foreign-key metadata.

CreateTable(ICustomTypeDescriptor) CreateTable(ICustomTypeDescriptor) CreateTable(ICustomTypeDescriptor) CreateTable(ICustomTypeDescriptor)

Creates the metadata for the specified table.

CreateTable(Type) CreateTable(Type) CreateTable(Type) CreateTable(Type)

Creates the metadata for the specified table.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetActionPath(String) GetActionPath(String) GetActionPath(String) GetActionPath(String)

Returns the action path for the current table and the specified action.

GetActionPath(String, IList<Object>) GetActionPath(String, IList<Object>) GetActionPath(String, IList<Object>) GetActionPath(String, IList<Object>)

Returns the action path for the current table, specified action, and specified primary key.

GetActionPath(String, IList<Object>, String) GetActionPath(String, IList<Object>, String) GetActionPath(String, IList<Object>, String) GetActionPath(String, IList<Object>, String)

Appends query strings to the action path, based on the specified primary key and virtual path.

GetActionPath(String, Object) GetActionPath(String, Object) GetActionPath(String, Object) GetActionPath(String, Object)

Returns the action path for the specified row by using the name of the action.

GetActionPath(String, Object, String) GetActionPath(String, Object, String) GetActionPath(String, Object, String) GetActionPath(String, Object, String)

Returns the action path for the specified row by using the name of the action and the virtual path of the action.

GetActionPath(String, RouteValueDictionary) GetActionPath(String, RouteValueDictionary) GetActionPath(String, RouteValueDictionary) GetActionPath(String, RouteValueDictionary)

Returns the action path for the current table and for the specified action and routes.

GetColumn(String) GetColumn(String) GetColumn(String) GetColumn(String)

Returns the metadata for the specified column.

GetColumnValuesFromRoute(HttpContext) GetColumnValuesFromRoute(HttpContext) GetColumnValuesFromRoute(HttpContext) GetColumnValuesFromRoute(HttpContext)

Gets the collection of column values.

GetDataKeyFromRoute() GetDataKeyFromRoute() GetDataKeyFromRoute() GetDataKeyFromRoute()

Retrieves the primary key of the entity from the route values.

GetDisplayString(Object) GetDisplayString(Object) GetDisplayString(Object) GetDisplayString(Object)

Returns the value to use as the display string for an instance of a row when the row is used in foreign-key relationships.

GetFilteredColumns() GetFilteredColumns() GetFilteredColumns() GetFilteredColumns()

Retrieves a list of columns that are filterable.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPrimaryKeyDictionary(Object) GetPrimaryKeyDictionary(Object) GetPrimaryKeyDictionary(Object) GetPrimaryKeyDictionary(Object)

Retrieves a dictionary of primary-key names and values for the specified row.

GetPrimaryKeyString(IList<Object>) GetPrimaryKeyString(IList<Object>) GetPrimaryKeyString(IList<Object>) GetPrimaryKeyString(IList<Object>)

Returns a comma-separated list of column values that represent the primary key for the specified row.

GetPrimaryKeyString(Object) GetPrimaryKeyString(Object) GetPrimaryKeyString(Object) GetPrimaryKeyString(Object)

Returns a comma-separated list of column values that represent the primary key for the specified row.

GetPrimaryKeyValues(Object) GetPrimaryKeyValues(Object) GetPrimaryKeyValues(Object) GetPrimaryKeyValues(Object)

Returns a collection of column values that represent the primary key for the specified row.

GetQuery() GetQuery() GetQuery() GetQuery()

Returns the IQueryable instance for the entity type that represents the table.

GetQuery(Object) GetQuery(Object) GetQuery(Object) GetQuery(Object)

Returns the IQueryable instance for the entity type that represents the table by using the data context.

GetScaffoldColumns(DataBoundControlMode, ContainerType) GetScaffoldColumns(DataBoundControlMode, ContainerType) GetScaffoldColumns(DataBoundControlMode, ContainerType) GetScaffoldColumns(DataBoundControlMode, ContainerType)

Returns a list of columns to display by using scaffolding.

GetTable(Type) GetTable(Type) GetTable(Type) GetTable(Type)

Retrieves the metatable that is associated with the specified type.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
Initialize() Initialize() Initialize() Initialize()

Initializes data that may not be available when the constructor is called.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ResetMetadata() ResetMetadata() ResetMetadata() ResetMetadata()

Resets the cached metadata for the table.

ToString() ToString() ToString() ToString()

Returns the name of the table.

TryGetColumn(String, MetaColumn) TryGetColumn(String, MetaColumn) TryGetColumn(String, MetaColumn) TryGetColumn(String, MetaColumn)

Returns a value that indicates whether a specified column can be found.

TryGetTable(Type, MetaTable) TryGetTable(Type, MetaTable) TryGetTable(Type, MetaTable) TryGetTable(Type, MetaTable)

Retrieves the metatable that is associated with the specified type and table.

Applies to