InterviewSolution
| 1. |
How To Configure Nhibernate? |
|
Answer» CONFIGURATION files and mapping files(.hbm.xml) are used by Configuration class to create the SessionFactory, which in turn CREATES the Session INSTANCE . Session instance are primary interface for persistence service. config file is used to specify connection details and mapping files used to map persistant objects to a relational database. It is best practice to store each object in an individual mapping file. SessionFactory is nhibernate concept of a single datastore and is threadsafe so that many THREADS can access it concurrently, SessionFactory is usually built only once at startup Configuration files and mapping files(.hbm.xml) are used by Configuration class to create the SessionFactory, which in turn creates the Session instance . Session instance are primary interface for persistence service. config file is used to specify connection details and mapping files used to map persistant objects to a relational database. It is best practice to store each object in an individual mapping file. SessionFactory is nhibernate concept of a single datastore and is threadsafe so that many threads can access it concurrently, SessionFactory is usually built only once at startup |
|