Szerkesztés

Megosztás a következőn keresztül:


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
MetaTable

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)

Initializes a new instance of the MetaTable class.

Properties

Attributes

Gets the attributes that are associated with the table.

Columns

Gets the column collection for the table.

DataContextPropertyName

Gets the name of the table.

DataContextType

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

DisplayColumn

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

DisplayName

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

EntityType

Gets the entity type that represents the table.

ForeignKeyColumnsNames

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

HasPrimaryKey

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

IsReadOnly

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

ListActionPath

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

Model

Gets the meta model that the table belongs to.

Name

Gets the unique name of the table.

PrimaryKeyColumns

Gets the collection of columns that define the primary key.

Provider

Gets the provider for the table.

RootEntityType

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

Scaffold

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

SortColumn

Gets the MetaColumn value that the table is sorted by.

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()

Creates the attribute collection.

CanDelete(IPrincipal)

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

CanInsert(IPrincipal)

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

CanRead(IPrincipal)

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

CanUpdate(IPrincipal)

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

CreateChildrenColumn(ColumnProvider)

Creates a new MetaChildrenColumn object.

CreateColumn(ColumnProvider)

Creates a MetaColumn object.

CreateContext()

Returns the data context for the table.

CreateForeignKeyColumn(ColumnProvider)

Creates an object that contains foreign-key metadata.

CreateTable(ICustomTypeDescriptor)

Creates the metadata for the specified table.

CreateTable(Type)

Creates the metadata for the specified table.

Equals(Object)

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

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

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

GetActionPath(String, IList<Object>)

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

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, Object)

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

GetActionPath(String, RouteValueDictionary)

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

GetActionPath(String)

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

GetColumn(String)

Returns the metadata for the specified column.

GetColumnValuesFromRoute(HttpContext)

Gets the collection of column values.

GetDataKeyFromRoute()

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

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()

Retrieves a list of columns that are filterable.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPrimaryKeyDictionary(Object)

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

GetPrimaryKeyString(IList<Object>)

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

GetPrimaryKeyString(Object)

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

GetPrimaryKeyValues(Object)

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

GetQuery()

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

GetQuery(Object)

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

GetScaffoldColumns(DataBoundControlMode, ContainerType)

Returns a list of columns to display by using scaffolding.

GetTable(Type)

Retrieves the metatable that is associated with the specified type.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
Initialize()

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

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ResetMetadata()

Resets the cached metadata for the table.

ToString()

Returns the name of the table.

TryGetColumn(String, MetaColumn)

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

TryGetTable(Type, MetaTable)

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

Applies to