Introduced
In the previous article, we introduced the view, solicit your comments, and I'll probably use three pages to cover the entire detailed process of how to use the stored procedure in NHibernate, which is all experience accumulated in practice, involving the error information just used, how to modify the stored procedure, and compare not to use the different points of stored procedures, and unofficial comparison of authoritative information, so please refer to.
Using mygeneration to generate stored procedures
Since the write stored procedure is not the focus of this section, we use the Mygeneration code generation tool to generate the stored procedures for inserting, updating, and deleting records for the Customer table. By the way also to learn how to use mygeneration open source Generator, if you do not have, please download the installation here.
After installation, open mygeneration, if you first use mygeneration will automatically pop-up "Default Settings" dialog box, you need to set the Mygeneration database connection string, template language, database driver, template storage path and other information, screenshot below ( Because this picture is more, click the picture enlarge):