我用的是NHibernate的3.3.3版本 web.config中如何配置 还有对应的xml的NHibernate 版本如何写??下面是我的配置方式web.comfig中
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
xml中<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-3.3.3">
<class name="mvcweb.Models.Course, mvcweb.Models" table="Course">
<id name="CourseId" column="CourseId" type="Int32">
<generator class="native" />
</id>
<property name="CourseName" column= "CourseName" type="string" length="40"/>
<property name="DateCreated" type="DateTime" length="8"/>
</class>
</hibernate-mapping>程序运行时 在读取xml是 提示 Could not compile the mapping document: G:\project\MVCTest\web\mvcweb\mvcweb\Content\xml\Course.hbm.xml这个 异常NHibernate
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
xml中<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-3.3.3">
<class name="mvcweb.Models.Course, mvcweb.Models" table="Course">
<id name="CourseId" column="CourseId" type="Int32">
<generator class="native" />
</id>
<property name="CourseName" column= "CourseName" type="string" length="40"/>
<property name="DateCreated" type="DateTime" length="8"/>
</class>
</hibernate-mapping>程序运行时 在读取xml是 提示 Could not compile the mapping document: G:\project\MVCTest\web\mvcweb\mvcweb\Content\xml\Course.hbm.xml这个 异常NHibernate
解决方案 »
- 谁用过DevExpress控件的请指导一下
- 关于多线程中iasyncresult.asyncwaithandle.waitone()方法的问题?
- 如何在一个frameset框架里面传值
- 急,FCKEditor自动换行求助--》
- 怎样在N多的文件里重用相同的数据库接连代码?
- 这个SQL语句怎么会有错误???
- 高手请进:用asp.net(C#)做成的网页如何限制成只能用1024*768的分辨率?
- 好简单的问题,如何做到将指针移到表格某一行,就变色?
- asp.net站点"您所请求的URL无法获取"
- 上传Excel文件(不同版本的)
- 怎么在单击gridview行根据获得bit值 选择checkbox checked属性为true
- 新浪微博web > API,获取官方微博的粉丝数
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect"/>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
<add key="hibernate.connection.connection_string" value="这里填写你数据库链接字符串"/>
</nhibernate>
上面“这里填写你数据库链接字符串”会写吧。
填写完再试试。