Hi,
Just getting into nhibenate.
Will it generate wrappers for my stored procedures?
I am trying out constructs product, not sure if there are others out there that might be better?
Hi,
Just getting into nhibenate.
Will it generate wrappers for my stored procedures?
I am trying out constructs product, not sure if there are others out there that might be better?
nHibernate doesn't generate anything, it is not a code generator. You can talk to stored procedures using nHibernate but you will have to write the mapping yourself.
Gonna get flagged for this one...sigh
If all you want is a wrapper for stored procs, and you are using SQL Server, you might consider using LINQ to SQL or Entity Framework. It would probably be less work for you. Typically it is just a drag-drop operation and everything is mapped for you.
Otherwise, what Craig said it (mostly) true. You have to create the hbm mappings for the sproc yourself.
There are many code generators that will create NHibernate mappings and the classes from the Datamodel. Not sure of any that would generate an SP signature though. If the SPs all follow the same structure then you could create your own template and generate code from that - try MyGeneration.
NHibernate is a Object-relational mapping (ORM) library. It is configured via XML or you can use Fluent-NHibernate which uses code to configure the mapping.
NHibernate is not a code generator. A good code generator is CodeSmith or LLGLGen Pro. if you are an advanced programmer you can use the T4 templates that are in Visual Studio 2008.
As far as i understand - Fluent-NHibernate does not support stored procedures. That means - you will have to add these maps manually in xml.
And be cautious with Linq To Entities Framework. For me it mapped only headache. :/