Gentle 简单配置方法之一种

1.下载Gentle-1.2.9等版本包

2.在VS中新建网站WebSite1

3.WebSite1加入引用
  浏览位置E:\TDdownload\Gentle-1.2.9\Output\Release
  加入文件
  Gentle.Common.dll
  Gentle.Framework.dll
  Gentle.Provider.SQLServer.dll

4.WebSite1加入配置文件web.config

5.修改web.config 加入如下节
<configuration>
  <configSections>
    <section name="gentle" type="Gentle.Common.GentleSectionHandler, Gentle.Common"/>
  </configSections>
  ...
  <gentle>
 <!-- 将E:\TDdownload\Gentle-1.2.9\Configuration下
        Gentle.config中的内容  拷贝到此 -->
  </gentle>
</configuration>

6.修改web.config内gentle下
<DefaultProvider name="SQLServer" connectionString="Data Source=192.168.0.1;Initial Catalog=testdb;Persist Security Info=True;User ID=sa;Password=sa" />

7.创建数据库表和视图
  使用代码工具CodeSmith或MyGeneration等生成Gentle类文件
  使用这些类

posted on 2007-07-18 18:03  freeliver54  阅读(405)  评论(0编辑  收藏  举报

导航