Loads entities of type EntityType meeting a custom SQL Where Clause.
Namespace:
Aspectize.CoreAssembly: AspectizeDAL (in AspectizeDAL.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# |
|---|
List<EntityType> GetEntitiesFromWhereClause<EntityType>( string whereClause ) where EntityType : new(), Entity |
| Visual Basic (Declaration) |
|---|
Function GetEntitiesFromWhereClause(Of EntityType As {New, Entity}) ( _ whereClause As String _ ) As List(Of EntityType) |
Parameters
- whereClause
- Type: System..::.String
The custom SQL Where Clause.
Type Parameters
- EntityType
- Type of Entity to load
Return Value
List of EntityType loaded by the queries
Remarks
WhereClause references physical column names.
Examples
string whereClause = "Name Like 'B%' Or Color = 'Black'"; List<AdventureWorks.Production.Product> products = dm.GetEntitiesFromWhereClause<AdventureWorks.Production.Product>(whereClause);
Dim whereClause As String = "Name Like 'B%' Or Color = 'Black'" Dim products As List(Of AdventureWorks.Production.Product) = dm.GetEntitiesFromWhereClause(Of AdventureWorks.Production.Product)(whereClause)