views:

31

answers:

0

I have been starting to follow the example on http://www.sharparchitecture.net on how to create a site using MVC.NET and NHibernate. I have gotten T4 to generate a object called Author for me, and validate it at the database.

I would like to create an object e.g. Book, but I can't however find any information on how I can create a many-to-many relationship between those two objects? Can I get the t4 to generate the relationship or do I need to alter it manually?

The relation table is called BookAuthors:

[Id][int]
[AuthorId][int]
[BookId][int]
[AuthorType][nvarchar(250)]