Stefan Tsalapatis - 216 - Oct 22, 2014

I would like to use AutoQuery, but I don’t use ORMLite till now,  and I need to create  queries  with dynamic SQL and parameters . I don’t access directly tables or views in the SQL  Server.  
If I define POCOS, can I use ORMLite and AutoQuery for dynamic SQL ?

Don’t know what you mean by dynamic SQL, if it refers to a feature documented in the wiki:
Yes, otherwise you’d to provide a more concrete example.

Stefan Tsalapatis:

+Demis Bellot
I don’t know ORMLIte.
Can we  have  an SQL statement  like
List<Dog> =db.Select<Dog>(
(“select  Name from Dogs where  Age =@Age”);
Can we use AutoQuery to provide the parameter values  like /Dog?Age=9 ?

+Stefan Tsalapatis Right, but this is why we spend a lot of time to create docs so you can learn how to use them and what features are available: and

Yes, Ormlite handles custom SQL:
Custom queries can be created in AutoQuery with [QueryField] or implcit conventions see:

Stefan Tsalapatis:

+Demis Bellot
 you are right, that I  have not spent time to read  all docs, because of work overload and because I use already other tools for this job. 
When you say that in OrmLite  "one class is one table"
I have misunderstood that the Person in the  example of the custom SQL,  must be a table in the SQL.  Not a  POCO , in service side, to get the results of  the dynamic SQL statement.   If this is correct, then I will be  happy to use the ORMLite and AutoQuery.

You need to install the SqlServer NuGet package, e.g ServiceStack.OrmLite.SqlServer