以下是subsonic 命令列引數
******************** commands *********************************
version: scripts out the schema/data of your db to file
scriptdata: scripts the data to file for your database
scriptschema: scripts your database schema to file
generate: generates output code for tables, views, and sps
generatetables: generates output code for your tables
generateods: generates and objectdatasource controller for each table
generateviews: generates output code for your views
generatesps: generates output code for your sps
editor: creates an editor for a particular table
下面是乙個使用的例子:
cd c:\program files\subsonic\subsonic 2.0.1
sonic generate/serverlocalhost/dbsubsonicdemo/outc:\subsonicdemo/config"c:\program files\subsonic\subsonic 2.0.1\sonic.exe.config"
sonic scriptschema/serverlocalhost/dbsubsonicdemo/outc:\subsonicdemo/config"c:\program files\subsonic\subsonic 2.0.1\sonic.exe.config"
這個命令將生成一系列model和controller類,後面那行命令是生成指定資料庫subsonicdemo 的schema。
有個疑問:好像沒有生成頁面檔案的命令,莫非只能用subsoniccentral生成?知道的告知一聲
下面是上面用到的sonic.exe.config檔案:
<?
xml version="
1.0"
encoding="
utf-8
"?>
<
configuration
>
<
configsections
>
<
section name="
dataconfiguration
"type="
microsoft.practices.enterpriselibrary.data.configuration.databasesettings,
microsoft.practices.enterpriselibrary.data, version=2.0.0.0, culture=neutral, publickeytoken=null
"requirepermission="
false
"/>
<
section name="
subsonicservice
"type="
subsonic.subsonicsection, subsonic
"allowdefinition="
"restartonexternalchanges="
true
"requirepermission="
false
"/>
configsections
>
<
/>
<
connectionstrings
>
<
add name="
subsonicdemo
"connectionstring="
data source=localhost; database=subsonicdemo; integrated security=true;
"/>
connectionstrings
>
<
dataconfiguration defaultdatabase="
subsonicdemoconnection
"/>
<
subsonicservice defaultprovider="
subsonicdemo
">
<
providers
>
<
clear
/>
<
add name="
subsonicdemo
"type="
subsonic.sqldataprovider, subsonic
"connectionstringname="
subsonicdemo
"generatednamespace="
subsonicdemo
"/>
providers
>
subsonicservice
>
configuration
>
命令列引數
c 程式設計師參考 main方法可以使用引數,在這種情況下它採用下列形式之一 static int main string args static void main string args main方法的引數是表示命令行引數的string陣列。通常通過測試length屬性來檢查引數是否存在,例如 ...
命令列引數
c程式中的mian具有兩個形參。int main int argc,char argv argc 命令列引數的數目 argv 指向一組引數值的第乙個元素 每個元素都是指向乙個引數文字的指標 指標陣列 每個元素都是乙個字元指標,陣列末尾是乙個null指標,argc的值和這個null都用於確定實際傳遞了...
命令列引數
命令列引數,也是一種形式的引數。它與我們常見的函式的引數的不同點在於,他是傳遞命令列的引數。c 中可以指定任意數量的命令列引數存放在args陣列中。args陣列的第乙個元素是執行該程式的.exe檔名。向其中新增命令列引數的方法 開啟專案屬性頁面 解決方案資源管理器中,所在專案的properties選...