N-Tier Layer Approach
AspxCodeGen 4.0's generated code was built using the 3-tier (n-tier) architecture. A presentation tier (the client), middle tier (business objects), and the data tier (data access objects). Although no web form or win form is generated as a presentation layer, classes (.cs or .vb) showing how to use the generated middle tier objects are generated to show how easy it is to use/call an operation from a client. The client could be a web form (.aspx), a win form, or a web service (.asmx), etc.

The middle tier encapsulates all calls to the data access objects (data tier) so that calling a CRUD (create, retrieve, update, delete) and other operations are very easy and may only take one line of code for most parts. We made it even easier by generating and showing an example for each CRUD operation, for each table in your database, so you just copy and paste a call from your chosen client (see Accessing Code from a Client (Code Examples)).

The data tier encapsulates all calls to the database. These could be calls to Stored Procedures or Dynamic SQL. Stored Procedures or Dynamic SQL are also generated so you don't have to worry about writing T-SQL commands.

The bottom line: All you have to code is the call from your client to the generated middle tier objects. For most parts, all you have to write is one line of code. The best part is; we also provide you the exact syntax to call an operation, so all you need to do is copy and paste the generated code from our examples. see Accessing Code from a Client (Code Examples).


For example you have a database table called "Categories", classes called CategoriesExample, Categories, and CategoriesDataLayer will be generated as seen in the image above. All the examples on how to Select, Update, Delete, Insert, etc to your "Categories" table can be copied from the CategoriesExample class and pasted to your client (web form, win form, web service, etc). And that's it, you don't have to write the middle tier objects, nor the data tier objects, nor the database objects (T-SQL code: stored procedures, dynamic sql), they are generated for you.
* Please see notes.