Thanks @mythz that worked.
Just curiosity why I cant provide a particular type or model in which I want to have the data?
Why it needs to be anonymous?
Only anonymous types are supported. The purpose of the custom select is to specify only which columns you want selected.
This isn’t the same as LINQ 2 Memory Select which is used for projection, instead projection only occurs when specifying which Type to project the results into, e.g:
var results = db.Select<MyDto>(q);
The typed projection changes the lambda expression definition making it non trivial to support, but it’s also unintuitive as using a POCO implies the Select expression is being used for projection and when projection occurs when it’s not, i.e. its purpose is only for selecting which RDBMS columns or expressions should be queried.