.NET code generation

letsgetsilly

Senior member
Oct 27, 2002
397
0
0
I've been searching the web for a Microsoft VB.NET code generator, and the best site I've come across is codegeneration.net.

The problem is they don't have much in the way of reviews or feedback.

Any suggestions on sites to go to that have some feedback, reviews, etc? Any suggestions on .NET code generators?

Thanks!
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Depends on what kind of code you want to generate, and why. nHibernate, for example, generates data access layer code from XML files describing entity relationships. What are you trying to do?
 

letsgetsilly

Senior member
Oct 27, 2002
397
0
0
That's a good question. I'm looking for something that can produce the data access layer and business layer from a database design in MS SQL Server.

All the basic Create, Read, Update, Delete methods in there. I don't really have a concept of how much code generators can accomplish, but I'm guessing they can take care of that, and I can take care of the UI and custom methods/objects.

 

yinan

Golden Member
Jan 12, 2007
1,801
2
71
Once you get the hang of it all those methods are easy. If you know exactly what is going on it will make your troubleshooting much easier. For example say an entry isnt getting entered into your database correctly how are you supposed to troubleshoot the problem if you dont know what exactly each line does.

 

Descartes

Lifer
Oct 10, 1999
13,968
2
0
If all you're doing is generating basic CRUD classes, then something like CodeSmith is the best tool for the job, imo. I've used it several times in large production applications, including generating domain models for over 50 developers on a single project. The guy that originally wrote CodeSmith is very active in the community, and he had a lot of support for CodeSmith long before he decided to make it commercial.

Another option is something like LLBLGen. Frans is also very active in the community, and his work is solid. This is perfect for generating simple CRUD classes like you want. CodeSmith is far more intelligent, but you might not need all the overhead.
 

Jaxidian

Platinum Member
Oct 22, 2001
2,230
0
71
twitter.com
I'd recommend MyGenerations (free and open source) or Entity Spaces (something like $85/dev cost but much more robust than MyGenerations).

:)
 

KB

Diamond Member
Nov 8, 1999
5,406
389
126
Originally posted by: Jaxidian
I'd recommend MyGenerations (free and open source) or Entity Spaces (something like $85/dev cost but much more robust than MyGenerations).

:)



I also use mygeneration as it is free, and the scripts are easy to edit/write. It gives me simple control on a class by class basis, instead of trying to generate all of the code for all of the database at once.
 

clamum

Lifer
Feb 13, 2003
26,256
406
126
Another MyGeneration suggestion. We use it at work (I haven't yet personally) and I guess it works pretty good.