SubSonic的配置及运用
SubSonic軟件的運用
由于在公司用到了一個新的工具自己很陌生,今天抽時間把Subsonic配置整理了一下,以備下次參考,同時也希望能給新接觸的朋友一個參考。不足之處盡在,敬請指正。
1.在Vss開發環境中的配置
在VS中打開工具->外部工具->添加外部工具
①標題SubSonic(可隨意)
②命令里要找到sonic.exe
③參數generate/out必須有他后面可以根據自己的需要寫
例:generate? /out App_Code/Model/Generated
就是把生成的代碼放到了Web網站的App_Code/Model/Generated目錄下
④初始目錄一般就選項目目錄就行(根據自己看情況)
⑤在下面:一般使用輸出窗口和提示輸入參數打鉤就行
Subsonic在WebConfig配置
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
? <configSections>
??? <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false" />
? </configSections>
? <appSettings/>
? <connectionStrings>
??? <add name="connection" connectionString="Data Source=./SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=SSPI;"/>
? </connectionStrings>
? <SubSonicService defaultProvider="SQLProvider">
??? <providers>
????? <add name="SQLProvider" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="connection" generatedNamespace="Northwind.DAL"/>
??? </providers>
? </SubSonicService>
</configuration>
總結
以上是生活随笔為你收集整理的SubSonic的配置及运用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php中文九九乘法表,PHP输出九九乘法
- 下一篇: Redfish协议测试工具–Postma