《NHibernate in Action》讀書筆記【一】

1) The core interface

   1.ISession interface :It exposes NHibernate's methods for finding,saving ,updating,and deleting objects. NHibernate sessions are not thread safe and should by design be used by only one thread at a time.

   2.ISessionFactory interface: The application obtains Isession instance from an IsessionFactory.

   3.Configuration  interface:  The Configuration object is used to configure NHibernate. the application used a Configuration instance to specfiy the location of mapping documents and to set NHibernate-specific properties before creating the ISessionFactory. It is the first object you'll meet when you being using NHibernate.

   4.Itransaction  interface :

   5.IQuery  interface: It is the basic interface used for fetching data using NHibernate. An IQuery instance is lightweight and can't be used outside the ISession that created it.

   6. ICriteria  interface:

 


 

  2) Types 

    An NHibernate Type object maps a .NET type to a database column type(the type may span multiple columns).

    NHibernate included a rich range of built-in types, covering all .NET primitives and many CLR classes, including types for System.DataTime,System.Enum,byte[] and Serializable classes.

    NHibernate supports user-defined custom types . The interface IUsertype ,ICompositeUserType and IParameterizedType are provided to let you create your own types .You can also use IUSerCollectionType to create your own collection types.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章