---
title: AutoGen & T4 Templates
---
## AutoQuery AutoGen
The recommended way to auto generate Tables and APIs for your existing RDBMS tables is to use [AutoQuery AutoGen](/autoquery/autogen) whose declarative nature allows us to easily generate AutoQuery & Crud Services using just declarative DTOs.
## T4 Templates
[OrmLite's T4 Template](https://github.com/ServiceStack/ServiceStack.OrmLite/tree/master/src/T4) are useful in database-first development or when wanting to use OrmLite with an existing RDBMS by automatically generating POCO's and strong-typed wrappers for executing stored procedures.
:::copy
``
:::