tags:

views:

327

answers:

5

Found out that llblgen costs money which I cannot afford at the time since I am on a Non-Paid internship atm. Do you guys know of a comparable alternative to llblgen. I am trying to get a good Code generator for making sql queries.

A: 

What platform? NHibernate, LINQ to SQL and the Entity Framework come to mind for .NET. All 100% free.

Dave Swersky
+1  A: 

Presumeably if you're mentioning LLBLGen, you're a .NET user - do you have access to Visual Studio? You can always use T4 - the code generator built into visual studio - I've used it with great success for various code generation. All you'd need would be some model which your code generation templates can read and then you could use T4 to generate SQL, or just about anything else you want.

Craig Shearer
A: 

For .net, I also really enjoy Subsonic 3 which uses T4 templates to generate ORM code.

  • Free
  • Extensible if you need different types of code generation
  • Easy to get started without having to learn too much

Subsonic website here

Nils
A: 

Please read this:

.NET and ORM - Decisions, decisions

You want either NHibernate or Subsonic, probably NHibernate. Try to avoid Microsoft's solutions (LinqToSql & EntityFramework).

Michael Maddox
Why wouldnt you want a code generator?
pzycoman
Code generation is very difficult to do correctly. In my opinion, the less code gen, the better. Here are more opinions: http://stackoverflow.com/questions/202871/are-code-generators-bad
Michael Maddox
Michael, in general you might be right about code generation, but LLBL generates ORM code EXCEPTIONALLY well. Calling it a code generator is a disservice to its capabilities (I know the original poster was the one who did so, just saying).
Andrew
@Andrew: I removed the code generation comment from my answer, it didn't really belong. If you are using an ORM against a pre-existing database, some amount of code generation helps to avoid violating the DRY (Don't Repeat Yourself) principal and/or helps bootstrap the project. I still believe in minimal code generation.
Michael Maddox
+2  A: 

Mindscape LightSpeed has a free edition for small databases and is similar in terms of O/R Mapping capability. It includes a rich Visual Studio designer with all the schema round tripping and capabilities you'd likely desire as a developer who wishes to avoid cumbersome mapping files.

If the database is larger than the free edition supports then get in touch as they are known to provide students with their software at no price.

You can read more about LightSpeed ORM here

traskjd