The preceding example mainly describes the IOC container features of the spring. NET Framework and the integration of Nhibernate.
The core content of the IOC container of spring. NET Framework is iobjectfactory, iapplicationcontext, and iobjectdefinition. Iobjectfactory is the core container interface that manages the injection objects in the container, while iapplicationcontext is the inheritance of iobjectfactory, which extends some functions. Iobjectdefinition is the definition interface of the injection object, which can be called by iobjectfactory/iapplicationcontext. In this example, a service positioning class servicelocator is used to encapsulate the use of spring. Net IOC containers.
The spring. NET Framework greatly simplifies the operation of Nhibernate. With Spring. net, you only need to understand the configuration of Nhibernate, instead of the sessionfactory and session mechanisms. Hibernatetemplate encapsulates all the operations on Nhibernate and extends the ihibernatecallback interface.
The use of spring. Net specifications can fully meet the object-oriented design principles such as dip (dependency inversion principle) and ISP (interface isolation principle.
CompleteCodeDownload:/files/guushuuse/aa_salaryprj_3.zip