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类文件
  使用这些类

相关文章:

  • 2021-07-25
  • 2021-12-25
  • 2022-12-23
  • 2022-01-09
  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-25
  • 2021-08-08
  • 2021-11-09
  • 2021-05-29
  • 2022-12-23
  • 2021-11-21
  • 2021-12-26
相关资源
相似解决方案