I am not sure if I even phrased correctly the title. I am very new to Subsonic. I have installed SubSonic in Visual Studio. I have follo开发者_C百科wed the configuration steps as presented in the tutorial of SubSonic. The problem is:
I try in my default.cs to reference Northwind in order to access its tables, but Northwind does not exist in the intellisense. So if I am not wrong Visual Studio does not see the database. Is there smtg wrong with my below connection string?
<connectionStrings>
<add name="Northwind"
connectionString="Data Source=VERONIQUE-PC;Database=Northwind;Integrated Security=true;">
</connectionStrings>
I forgot to say that I use .Net Framework 2.0, so I installed the 2.1 version of SubSonic. I also use SQL Server 2005
I would appreciate your help.
- Since you want to leverage BuildProvider make sure you're doing all those steps in Web Site project (not Web Application)
- Add configuration stuff (you already done this)
- Add "App_Code" to the solution in Visual Studio
- Create a text file, e.g. model.abp in App_Code folder and add some content into it (for example, just type one star * or anything else)
- Press F6, wait until it completes the build, then go to default.aspx.cs and try to type Northwind. you should see IntelliSense.
But I always prefer generating the model via Command Line tool instead of build provider because it's not dependent on project type and you can integrate it to automated builds.
精彩评论