2010-09-17 49 views
0

亚音速3.0可与winform应用程序一起使用?我是否需要添加对system.web的任何引用?亚音速3.0与winform应用程序

如果可以这样做,我该如何排除数据库中的某些表?我可以使用以下我用亚音速2.0

<providers> 
    <!--<clear/>--> 
    <add name="TEST" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="myString" includeTableList="CustomerReference" includeProcedureList=""/> 
</providers> 

回答

1

您可以使用它!没有必要包含System.web。但是你失去了脚手架工具(除了你专门制作一个Web应用程序来使用这些工具并与桌面应用程序共享数据库)。 和除表,则必须修改Settings.ttinclude,在下面的章节中Settings.ttinclude(30行):

//this is a list of tables you don't want generated 
string[] ExcludeTables = new string[]{ 
"sysdiagrams", 
"BuildVersion", 
}; 

我从来没有使用过亚音速2,buth我认为对于该数据的XML定义提供者有点不同。

例如,这是我使用的是什么:

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
    <connectionStrings> 
    <!-- SQLite --> 
    <add name="Test" 
     providerName="System.Data.SQLite" 
     connectionString="Data Source = C:\Database.db;Version=3"/> 
    </connectionStrings> 
</configuration> in