ITable 接口

定义

用于弱类型查询方案。Used for weakly typed query scenarios.

public interface class ITable : System::Collections::IEnumerable, System::Linq::IQueryable
public interface ITable : System.Collections.IEnumerable, System.Linq.IQueryable
type ITable = interface
    interface IEnumerable
    interface IQueryable
Public Interface ITable
Implements IEnumerable, IQueryable
派生
实现

注解

有关方法的详细信息, 请Table<TEntity>参阅。For more information about methods, see Table<TEntity>.

属性

Context

获取已用于检索此 ITableDataContextGets the DataContext that has been used to retrieve this ITable.

ElementType

获取在执行与 IQueryable 的此实例关联的表达式树时返回的元素的类型。Gets the type of the element(s) that are returned when the expression tree associated with this instance of IQueryable is executed.

(继承自 IQueryable)
Expression

获取与 IQueryable 的实例关联的表达式树。Gets the expression tree that is associated with the instance of IQueryable.

(继承自 IQueryable)
IsReadOnly

指示此 ITable 实例中包含的实体的类型是否具有主键。Indicates if the type of the entities contained in this ITable instance has a primary key.

Provider

获取与此数据源相关联的查询提供程序。Gets the query provider that is associated with this data source.

(继承自 IQueryable)

方法

Attach(Object)

以未修改状态将实体附加到 DataContextAttaches an entity to the DataContext in an unmodified state.

Attach(Object, Boolean)

以修改或未修改状态将集合的所有实体附加到 DataContextAttaches all entities of a collection to the DataContext in either a modified or unmodified state.

Attach(Object, Object)

通过指定实体及其原始状态,以修改或未修改状态将实体附加到 DataContextAttaches an entity to the DataContext in either a modified or unmodified state by specifying both the entity and its original state.

AttachAll(IEnumerable)

以修改或未修改状态将集合的所有实体附加到 DataContextAttaches all entities of a collection to the DataContext in either a modified or unmodified state.

AttachAll(IEnumerable, Boolean)

以修改或未修改状态将集合的所有实体附加到 DataContextAttaches all entities of a collection to the DataContext in either a modified or unmodified state.

DeleteAllOnSubmit(IEnumerable)

将集合中的所有实体置为 pending delete 状态。Puts all entities from the collection into a pending delete state.

DeleteOnSubmit(Object)

将此表中的实体置为 pending delete 状态。Puts an entity from this table into a pending delete state.

GetEnumerator()

返回循环访问集合的枚举数。Returns an enumerator that iterates through a collection.

(继承自 IEnumerable)
GetModifiedMembers(Object)

返回包含当前值和原始值的已修改成员的数组。Returns an array of modified members that contain their current and original values.

GetOriginalEntityState(Object)

检索原始值。Retrieves original values.

InsertAllOnSubmit(IEnumerable)

pending insert 状态将集合中的所有实体添加到 DataContextAdds all entities of a collection to the DataContext in a pending insert state.

InsertOnSubmit(Object)

将处于 pending insert 状态的实体添加到此表。Adds an entity in a pending insert state to this table.

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Cast<TResult>(IQueryable)

IQueryable 的元素转换为指定的类型。Converts the elements of an IQueryable to the specified type.

OfType<TResult>(IQueryable)

根据指定类型筛选 IQueryable 的元素。Filters the elements of an IQueryable based on a specified type.

适用于