SqlTable Class

A non-generic version of SqlTable<TEntity> which can be used when the type of the entity is not known at build time. This class cannot be instantiated, to get an instance use the Database.Table(Type) method.

Inheritance Hierarchy

System.Object
  DbExtensions.SqlSet
    DbExtensions.SqlTable

Namespace: DbExtensions
Assembly: DbExtensions.dll

Syntax

public sealed class SqlTable : SqlSet

The SqlTable type exposes the following members.

Properties

Name Description
Database The Database this set is connected to.
(Inherited from SqlSet)
Name Gets the name of the table.
ResultType The type of objects this set returns. This property can be null.
(Inherited from SqlSet)

Methods

Name Description
Add Recursively executes INSERT commands for the specified entity and all its one-to-one and one-to-many associations.
AddAsync Recursively executes INSERT commands for the specified entity and all its one-to-one and one-to-many associations.
AddRange(IEnumerable<Object>) Recursively executes INSERT commands for the specified entities and all their one-to-one and one-to-many associations.
AddRange(Object[]) Recursively executes INSERT commands for the specified entities and all their one-to-one and one-to-many associations.
AddRangeAsync(Object[]) Recursively executes INSERT commands for the specified entities and all their one-to-one and one-to-many associations.
AddRangeAsync(IEnumerable<Object>, CancellationToken) Recursively executes INSERT commands for the specified entities and all their one-to-one and one-to-many associations.
All(OperatorStringHandler) Determines whether all elements of the set satisfy a condition.
(Inherited from SqlSet)
All(String) Determines whether all elements of the set satisfy a condition.
(Inherited from SqlSet)
AllAsync(OperatorStringHandler, CancellationToken) Determines whether all elements of the set satisfy a condition.
(Inherited from SqlSet)
AllAsync(String, CancellationToken) Determines whether all elements of the set satisfy a condition.
(Inherited from SqlSet)
Any() Determines whether the set contains any elements.
(Inherited from SqlSet)
Any(OperatorStringHandler) Determines whether any element of the set satisfies a condition.
(Inherited from SqlSet)
Any(String) Determines whether any element of the set satisfies a condition.
(Inherited from SqlSet)
AnyAsync(CancellationToken) Determines whether the set contains any elements.
(Inherited from SqlSet)
AnyAsync(OperatorStringHandler, CancellationToken) Determines whether any element of the set satisfies a condition.
(Inherited from SqlSet)
AnyAsync(String, CancellationToken) Determines whether any element of the set satisfies a condition.
(Inherited from SqlSet)
AsAsyncEnumerable Gets all elements in the set. The query is deferred-executed.
(Inherited from SqlSet)
AsEnumerable Gets all elements in the set. The query is deferred-executed.
(Inherited from SqlSet)
Cast(Type) Casts the elements of the set to the specified type.
(Inherited from SqlSet)
Cast<TEntity>() Casts the current SqlTable to the generic SqlTable<TEntity> instance.
Contains Checks the existance of the entity, using the primary key value.
(Inherited from SqlSet)
ContainsAsync Checks the existance of the entity, using the primary key value.
(Inherited from SqlSet)
ContainsKey Checks the existance of an entity whose primary matches the id parameter.
(Inherited from SqlSet)
ContainsKeyAsync Checks the existance of an entity whose primary matches the id parameter.
(Inherited from SqlSet)
Count() Returns the number of elements in the set.
(Inherited from SqlSet)
Count(OperatorStringHandler) Returns a number that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
Count(String) Returns a number that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
CountAsync(CancellationToken) Returns the number of elements in the set.
(Inherited from SqlSet)
CountAsync(OperatorStringHandler, CancellationToken) Returns a number that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
CountAsync(String, CancellationToken) Returns a number that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
Find Gets the entity whose primary key matches the id parameter.
(Inherited from SqlSet)
FindAsync Gets the entity whose primary key matches the id parameter.
(Inherited from SqlSet)
First() Returns the first element of the set.
(Inherited from SqlSet)
First(OperatorStringHandler) Returns the first element in the set that satisfies a specified condition.
(Inherited from SqlSet)
First(String) Returns the first element in the set that satisfies a specified condition.
(Inherited from SqlSet)
FirstAsync(CancellationToken) Returns the first element of the set.
(Inherited from SqlSet)
FirstAsync(OperatorStringHandler, CancellationToken) Returns the first element in the set that satisfies a specified condition.
(Inherited from SqlSet)
FirstAsync(String, CancellationToken) Returns the first element in the set that satisfies a specified condition.
(Inherited from SqlSet)
FirstOrDefault() Returns the first element of the set, or a default value if the set contains no elements.
(Inherited from SqlSet)
FirstOrDefault(OperatorStringHandler) Returns the first element of the set that satisfies a condition or a default value if no such element is found.
(Inherited from SqlSet)
FirstOrDefault(String) Returns the first element of the set that satisfies a condition or a default value if no such element is found.
(Inherited from SqlSet)
FirstOrDefaultAsync(CancellationToken) Returns the first element of the set, or a default value if the set contains no elements.
(Inherited from SqlSet)
FirstOrDefaultAsync(OperatorStringHandler, CancellationToken) Returns the first element of the set that satisfies a condition or a default value if no such element is found.
(Inherited from SqlSet)
FirstOrDefaultAsync(String, CancellationToken) Returns the first element of the set that satisfies a condition or a default value if no such element is found.
(Inherited from SqlSet)
GetAsyncEnumerator Returns an async enumerator that iterates through the set.
(Inherited from SqlSet)
GetDefiningQuery Returns the SQL query that is the source of data for the set.
(Inherited from SqlSet)
GetEnumerator Returns an enumerator that iterates through the set.
(Inherited from SqlSet)
Include Specifies the related objects to include in the query results.
(Inherited from SqlSet)
IncludeMany Specifies which collections to include in the query results.
(Inherited from SqlSet)
LongCount() Returns an Int64 that represents the total number of elements in the set.
(Inherited from SqlSet)
LongCount(OperatorStringHandler) Returns an Int64 that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
LongCount(String) Returns an Int64 that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
LongCountAsync(CancellationToken) Returns an Int64 that represents the total number of elements in the set.
(Inherited from SqlSet)
LongCountAsync(OperatorStringHandler, CancellationToken) Returns an Int64 that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
LongCountAsync(String, CancellationToken) Returns an Int64 that represents how many elements in the set satisfy a condition.
(Inherited from SqlSet)
OrderBy(OperatorStringHandler) Sorts the elements of the set according to the columnList.
(Inherited from SqlSet)
OrderBy(String) Sorts the elements of the set according to the columnList.
(Inherited from SqlSet)
Refresh Sets all column members of entity to their most current persisted value.
RefreshAsync Sets all column members of entity to their most current persisted value.
Remove Executes a DELETE command for the specified entity.
RemoveAsync Executes a DELETE command for the specified entity.
RemoveKey Executes a DELETE command for the entity whose primary key matches the id parameter.
RemoveKeyAsync Executes a DELETE command for the entity whose primary key matches the id parameter.
RemoveRange(IEnumerable<Object>) Executes DELETE commands for the specified entities.
RemoveRange(Object[]) Executes DELETE commands for the specified entities.
RemoveRangeAsync(Object[]) Executes DELETE commands for the specified entities.
RemoveRangeAsync(IEnumerable<Object>, CancellationToken) Executes DELETE commands for the specified entities.
Select(OperatorStringHandler, Type) Projects each element of the set into a new form.
(Inherited from SqlSet)
Select(String, Type) Projects each element of the set into a new form.
(Inherited from SqlSet)
Select<TResult>(OperatorStringHandler) Projects each element of the set into a new form.
(Inherited from SqlSet)
Select<TResult>(String) Projects each element of the set into a new form.
(Inherited from SqlSet)
Select<TResult>(OperatorStringHandler, Func<DbDataReader, TResult>) Projects each element of the set into a new form.
(Inherited from SqlSet)
Select<TResult>(String, Func<DbDataReader, TResult>) Projects each element of the set into a new form.
(Inherited from SqlSet)
Single() The single element of the set.
(Inherited from SqlSet)
Single(OperatorStringHandler) Returns the only element of the set that satisfies a specified condition, and throws an exception if more than one such element exists.
(Inherited from SqlSet)
Single(String) Returns the only element of the set that satisfies a specified condition, and throws an exception if more than one such element exists.
(Inherited from SqlSet)
SingleAsync(CancellationToken) The single element of the set.
(Inherited from SqlSet)
SingleAsync(OperatorStringHandler, CancellationToken) Returns the only element of the set that satisfies a specified condition, and throws an exception if more than one such element exists.
(Inherited from SqlSet)
SingleAsync(String, CancellationToken) Returns the only element of the set that satisfies a specified condition, and throws an exception if more than one such element exists.
(Inherited from SqlSet)
SingleOrDefault() Returns the only element of the set, or a default value if the set is empty; this method throws an exception if there is more than one element in the set.
(Inherited from SqlSet)
SingleOrDefault(OperatorStringHandler) Returns the only element of the set that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
(Inherited from SqlSet)
SingleOrDefault(String) Returns the only element of the set that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
(Inherited from SqlSet)
SingleOrDefaultAsync(CancellationToken) Returns the only element of the set, or a default value if the set is empty; this method throws an exception if there is more than one element in the set.
(Inherited from SqlSet)
SingleOrDefaultAsync(OperatorStringHandler, CancellationToken) Returns the only element of the set that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
(Inherited from SqlSet)
SingleOrDefaultAsync(String, CancellationToken) Returns the only element of the set that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.
(Inherited from SqlSet)
Skip Bypasses a specified number of elements in the set and then returns the remaining elements.
(Inherited from SqlSet)
Take Returns a specified number of contiguous elements from the start of the set.
(Inherited from SqlSet)
ToArray Creates an array from the set.
(Inherited from SqlSet)
ToArrayAsync Creates an array from the set.
(Inherited from SqlSet)
ToList Creates a List<T> from the set.
(Inherited from SqlSet)
ToListAsync Creates a List<T> from the set.
(Inherited from SqlSet)
ToString Returns the SQL query of the set.
(Inherited from SqlSet)
Update(Object) Executes an UPDATE command for the specified entity.
Update(Object, Object) Executes an UPDATE command for the specified entity.
UpdateAsync(Object, CancellationToken) Executes an UPDATE command for the specified entity.
UpdateAsync(Object, Object, CancellationToken) Executes an UPDATE command for the specified entity.
UpdateRange(IEnumerable<Object>) Executes UPDATE commands for the specified entities.
UpdateRange(Object[]) Executes UPDATE commands for the specified entities.
UpdateRangeAsync(Object[]) Executes UPDATE commands for the specified entities.
UpdateRangeAsync(IEnumerable<Object>, CancellationToken) Executes UPDATE commands for the specified entities.
Where(OperatorStringHandler) Filters the set based on a predicate.
(Inherited from SqlSet)
Where(String) Filters the set based on a predicate.
(Inherited from SqlSet)

See Also

Reference

DbExtensions Namespace

© Max Toro Q.