Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

News

My Friends

My Links

Permanent Posts

Portuguese Communities

ASP.NET Dynamic Data NHibernate Provider

My NHibernateDataSource was just a necessary step in order to build an ASP.NET Dynamic Data provider for NHibernate. I am pleased to say that it is now working! Like the NHibernateDataSource, it is only - for now - merely a proof of concept, it needs cleaning up and still misses the association metadata part, which means no links to associated entities, but list, edit, delete and insert are working fine.

If you want to try it, please download it and send me your feedback.

In order to use it, create a Dynamic Data Web Application project and change the name of the context class on the Global.asax.cs file:

model.RegisterContext(new NHibernateDataModelProvider(typeof(MyNHibernateContext)), new ContextConfiguration() { ScaffoldAllTables = true });

Then, on all of the ASPX files under the DynamicData folder, replace the EntityDataSource declaration for the NHibernateDataSource, keeping all of the properties. Add the NHibernateDataSource files to your project and add references to NHibernate and LINQ to NHibernate, from the NHContrib project, and that's it!

Bookmark and Share

Comments

No Comments