maxtoroq / DbExtensions

Data-access framework with a strong focus on query composition, granularity and code aesthetics.
https://maxtoroq.github.io/DbExtensions/
Apache License 2.0
227 stars 41 forks source link

Support Select in SqlSet without specifying a result type #23

Closed maxtoroq closed 10 years ago

maxtoroq commented 10 years ago

Currently, the API assumes that if you call Select you want to project to a different type. You can simply pass the same type to work around it:

db.From<Product>("products")
  .Select<Product>("id, name") /* map only these properties */

However, if you are working with an untyped set, you cannot call Select and stay untyped (using DynamicMapper), you have to pass a result type.