Last post Sep 28, 2009 02:38 PM by atconway
Sep 25, 2009 09:41 PM|Shiko|LINK
Hi all,i used to create the data access layer by myself,and it was fine,but really takes a lot of time.so i thought about using code generators which create the stored procedures and the c # classes also the data access objects which represent the stored
procedures in my code...
i found a lot of code generators but i am lost which is much better and better for performance.
i worked on a project tht used this
Data tier generator it is good but a little bit complex and when i tried to build a new project using it ,it created different method calls in the inner classes..than the methods in the old project i worked on,,so i had to change them by hand everytime
i make a change to the database.i dont know why did that happen,also i feel it is not good for performance,also it makes an error if use the data type "varchar(Max)" or "nvarchar(Max)" it creates them in the stored procedures as "varchar(-1)" or "nvarchar(-1)"
which seems to be for older version.
also i found Code Author which is a good tool,but not free!!
after some searching on the forum i found this
http://www.pureobjects.com/dbcode.aspx but it does not seem very reliable..at least it does not create stored procedures to select by forign or primary key.
also Advantage Builder which seems to be complex and not easy to use.
and a lot others such as code smith and others
Now the question is what is the best freeware code generator,,and what is the best non-free generators ,i mean the best for performance and maintainance
Thanx in advance
Sep 25, 2009 10:06 PM|docluv|LINK
I am a huge Code Smith fan, www.codesmithtools.com. I have custom templates for BLL and UIs and have it setup so all I have to do is point a master template at a database and BAM!!! Repositories, Entities, Admin
and public pages all ready to start customizing.
Sep 26, 2009 12:02 AM|Shiko|LINK
Thanks for your quick reply docluv,i gave a look at codesmith website and downloaded the trial version,but it really seems to be complicated..i will try the help they provide and see what it does. because what u said about it is really very interesting.
Sep 27, 2009 04:31 AM|mendhak|LINK
What about the
ADO.NET Entity Framework? It works off the database you give it and creates the entities and database calls for you. All you do in your app is then work with the entities in your business layer, and it performs the database calls by creating the DAL behind
Sep 28, 2009 01:19 PM|docluv|LINK
I use EF, in fact I have book coming out next week using it, and I generate Repositories, custom partial classes for the generated entities and pages around the EF model (well the tables it is built around at least).
I don't think Code Smith is terribly complicated. It uses the same .NET framework you are used to and it very similar to writing an ASP.NET page.
I am giving a talk right now at Code Camps and UG called 'Bigger, Stronger, Faster' where (if time permits) show how to point CodeSmith at a database and just gerenate the code code for an ASP.NET web site in a matter of seconds. I am working on an accompanying
blog right now too.
Sep 28, 2009 02:38 PM|atconway|LINK
Well if this URL implies what it should do and want you want, then hopefully the code generator is
easy to use
It looks like it has a small fee of about $49 to purchase: