views:

43

answers:

1

I need to call some stored procedures via NHibernate (not necessarily for CRUD-operations). Is there a freeware/open source tool which can generate mappings (a hbm.xml) for stored procedures and tables?

+2  A: 

You can accomplish this by mapping the stored procedures as named queries. There is a good write up on this at NHForge.org. You can create the stored procedures themselves as part of your schema generation using database-object mappings; see here for details.

As far as some sort of pre-built tool goes to accomplish this, you're pretty much out of luck. However, implementing this as described above is trivial.

DanP