David Hayden [MVP C#]

Sponsors

The Lounge

Wicked Cool Jobs

News

  • CodeBetter.Com Home

Other Links

Teas

Patterns & Practices

Florida .NET Developer

Book Reviews

Tampa ASP.NET MVC Developer Group

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
T4 Templates for Fluent NHibernate

I put together T4 Templates that generate sample Fluent NHibernate Mapping Classes based on metadata in a LINQ To SQL DBML File:

These aren't production quality T4 Templates, but more of a proof of concept that I put together rather quickly to jumpstart the conversion to NHibernate from LINQ To SQL. I had to manually make some changes after running the templates to support many-to-many relationships that are not supported by LINQ To SQL, tweak lengths of certain database columns, etc. There are probably a number of limitations I am not aware of, but they worked well given the simple nature of the relational database model I was dealing with. Depending on your situation your mileage may vary :)

 

 

 

You can learn more about the T4 Templates here.

 

Recent Posts:

 


Posted 12-14-2008 2:40 PM by David Hayden

[Advertisement]

Comments

James Gregory wrote re: T4 Templates for Fluent NHibernate
on 12-14-2008 7:17 PM

Very cool, nice work David.

I (being on the Fluent NHibernate team) am really flattered by efforts by people like yourself in making fluent nhib even better. Thanks!

Devlicio.us