There are quite a few data access code generators available for .NET, with widely varying
costs and feature sets.This example demonstrates LLBLGen, an open source data tier
generator that supports a wide array of options for the created files. It generates stored
procedures for insert, update, select, and delete for the tables selected, and then creates
VB or C# classes to call these procedures. It is available at
http://www.sd.nl/
software/.This section uses version 1.2, released in November 2002.
To use LLBLGen, simply start the program and provide the connection information
for your database, as below figure shows.
Next, choose the tables and views for which you want to generate data access classes, as shown in below figure
Now, choose the options you want for your .NET classes, including naming conventions,
namespaces, language, and method of storing the connection string. Below figure shows the available options.
Do the same thing for the SQL procedures-pick which ones you want to generate, choose a common name prefix for them, and pick other options as described in below figure.
Finally, generate the code! Choose the output paths for the .NET source files and the T-SQL script file, and watch as it generates your code for you.Below figure concludes this example, showing how a successful code generation should end.
No comments:
Post a Comment