本人新手 求详细步骤 谢谢大家  

解决方案 »

  1.   

    http://www.cnblogs.com/lyj/太多了,自个儿看吧...
      

  2.   

    下个包,然后用工具生成映射和对应的实体类
    映射文件改成嵌入的资源
    使用加上配置
    <?xml version="1.0" encoding="utf-16"?>
    <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
      <session-factory name="">
        <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
        <property name="dialect">NHibernate.Dialect.MsSql2008Dialect, NHibernate</property>
        <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
        <property name="connection.connection_string">Data Source=192.168.0.10;Initial Catalog=CMS;Persist Security Info=True;User ID=sa;Password=258369</property>
        <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
        <property name="cache.use_minimal_puts">false</property>
        <property name="cache.use_query_cache">True</property>
        <property name="use_outer_join">false</property>
        <property name="adonet.batch_size">10</property>
        <property name="show_sql">true</property>
        <property name="command_timeout">10</property>
        <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
        <property name="current_session_context_class">thread_static</property>
        <mapping  assembly="映射对应的命名空间" />
      </session-factory>
    </hibernate-configuration>
    其它的http://www.cnblogs.com/lyj/上东西不少,但是有些杂乱,有点入门之后看还可以
    随便网上搜搜有好多,spring.net的示例里也有,虽然看的更难些,但是例子很好值得琢磨
      

  3.   

    nhibernate连接sql2008 asp项目 有源码吗 ?给我一个