Miado - Much-improved ADO.Net
Assembly: Miado (in Miado.dll) Version: 0.8.10214.0 (0.8.10214.0)
Return a Collection of a specific object type
that is populated from the result set of a given query
Namespace:
MiadoAssembly: Miado (in Miado.dll) Version: 0.8.10214.0 (0.8.10214.0)
Syntax
| C# |
|---|
IEnumerable<T> QueryForResults<T>( IDictionary<string, string> propertyToColumnMapping ) where T : new() |
| Visual Basic (Declaration) |
|---|
Function QueryForResults(Of T As New) ( _ propertyToColumnMapping As IDictionary(Of String, String) _ ) As IEnumerable(Of T) |
| Visual C++ |
|---|
generic<typename T> where T : gcnew() IEnumerable<T>^ QueryForResults( IDictionary<String^, String^>^ propertyToColumnMapping ) |
Parameters
- propertyToColumnMapping
- Type: System.Collections.Generic..::.IDictionary<(Of <(String, String>)>)
a Dictionary containing mappings of Properties on type T to columns in the result set
Type Parameters
- T
- the type of object that will be created using the DbDataReader
Return Value
a strongly-typed collection of objects
Remarks
This method is offered as pure syntactical sugar. It has
two concerns: 1) it has no compile time safety; and 2) it uses
reflection to access the properties, so it will be much slower
than using the QueryForResults() method using a standard
DbDataReader