Returns a strongly typed list of Entity objects that represent the records returned by the specified database command.

Namespace:  Mindscape.LightSpeed
Assembly:  Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
IList<TEntity> FindBySql<TEntity>(
	IDbCommand command
) where TEntity : Entity
Visual Basic (Declaration)
Function FindBySql(Of TEntity As Entity) ( _
	command As IDbCommand _
) As IList(Of TEntity)

Parameters

command
Type: System.Data..::.IDbCommand
The command.

Type Parameters

TEntity

Return Value

A strongly typed list of Entity objects that represent the records returned by the command.

Examples

CopyC#
IDbCommand command = lightSpeedContext.DataProviderObjectFactory.CreateCommand();
command.CommandText = "SELECT Id, Name, Price FROM Products";
command.CommandType = CommandType.Text;
IList<ProductSummary> summaries = unitOfWork.FindBySql<ProductSummary>(command);

See Also