惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
Arctic Wolf
T
The Blog of Author Tim Ferriss
月光博客
月光博客
Recent Announcements
Recent Announcements
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 三生石上(FineUI控件)
P
Proofpoint News Feed
The Register - Security
The Register - Security
博客园 - 叶小钗
博客园 - Franky
The Cloudflare Blog
雷峰网
雷峰网
罗磊的独立博客
M
MIT News - Artificial intelligence
I
InfoQ
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
爱范儿
爱范儿
博客园 - 司徒正美
Recorded Future
Recorded Future
酷 壳 – CoolShell
酷 壳 – CoolShell
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
F
Full Disclosure
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog
大猫的无限游戏
大猫的无限游戏
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
WordPress大学
WordPress大学
小众软件
小众软件
K
Kaspersky official blog
Attack and Defense Labs
Attack and Defense Labs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Forbes - Security
Forbes - Security
aimingoo的专栏
aimingoo的专栏
IT之家
IT之家
The Last Watchdog
The Last Watchdog
N
News and Events Feed by Topic
B
Blog RSS Feed
S
Security @ Cisco Blogs
美团技术团队
量子位
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cloudbric
Cloudbric
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 蹲在路边写代码

8000401a错误解决方案(Office Word,Excel,PowerPoit应用程序无法访问) SQL Server 2005 无法删除用户的解决方法 遍例指定目录及子目录下的所有文件添加进数据库 改善SQL语句的效率的几条原则,不断积累中 一些常用的WebServices 转Javascript的IE和Firefox兼容性汇编 - 蹲在路边写代码 - 博客园 转--使用 Request.QueryString 接受参数时,跟编码有关的一些问题 - 蹲在路边写代码 IE的showModalDialog与FireFox的window.open 父子窗口传值示例 三种常见选项卡效果 - 蹲在路边写代码 - 博客园 C#高级编程学习笔记(五)字符串与正则表达式 C#高级编程学习笔记(四) 内存管理和指针 SQL SELECT 语句完整的执行顺序 C#高级编程学习笔记(三)委托和事件 C#高级编程学习笔记(二)运算符和类型转换 C#高级编程学习笔记(-)C#基础 对象和类型 继承 构造函数和析构函数的原理及在C#中的运用(转载) CSS在IE与Firefox下的兼容性 CSS Hack 汇总 ASP.NET的页面间传值方法 - 蹲在路边写代码 - 博客园
.NET的ORM工具SubSonic2.03的配置
蹲在路边写代码 · 2008-01-01 · via 博客园 - 蹲在路边写代码

1。 安装SubSonic2.03和SubSonic Tools2.03(SubSonic的官方网站http://www.subsonicproject.com)。

2。 新建一个visual studio 2005的工程,数据库用Sql Server2000(建议用2005版本,实际上SubSonic同样支持mysql和oracle),先添加几个表。

3。 添加引用,浏览添加SubSonic.dll(SubSonic安装目录下),添加System.configuration引用。

4。 如果是Web应用程序按F5可以产生Web.config(或者手动添加,这不是什么难题),如果是WindowsForm或者Dll应用程序,手动添加App.config。在配置文件中添加:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <section name="SubSonicService"
          type="SubSonic.SubSonicSection, SubSonic"
         allowDefinition="MachineToApplication"
         restartOnExternalChanges="true"
         requirePermission="false"/>
      <section name="dataConfiguration"
         type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
         Microsoft.Practices.EnterpriseLibrary.Data" />
    </configSections>
    <appSettings/>
   <connectionStrings>
        <clear/>
        <add name="NorthwindConnection" connectionString="连接字符串"/>
     </connectionStrings>
     <SubSonicService defaultProvider="Northwind">
           <providers>
                 <clear/>
                 <add name="Northwind" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="NorthwindConnection"
      generatedNamespace="Northwind"
                 />
            </providers>
      </SubSonicService>
</configuration>

5。 VS菜单“工具-外部工具”,添加

标题:SubSonic DAL

命令:D:\SubSonic\SubSonic 2.0.3\SubCommander\sonic.exe

参数:generate /out App_Code\Generated

初始目录:$(ProjectDir)

钩选:使用输出窗口;提示输入参数;退出时关闭(推荐)

  为方便使用,在“工具-自定义”中“工具栏”新建“SubSonic”(默认钩选,显示),点“命令”-“工具”,数一下从“创建GUID”开始“SubSonic DAL”的位置即相应“外部命令某”,拖至“SubSonic”工具栏。

6。 在App_Code目录下建文件夹“Generate”,点击“SubSonic DAL”,确定即开始自动生成,完成后刷新项目即可看到生成在该文件夹下的代码。
转载:http://hi.baidu.com/beloving/blog/item/472d17ce1ed17e3ab600c8a9.html