Victor
Victor

Reputation: 3

SubSonic active record in vs 2010 doesn't work properly

VS 2010 rc; SQL Server 2008 eXpress; .net 3.5; database - northwind;

all options in tt template are set by default. It simply doesn't generates some tables in that bunch of code :

#region ' Schemas '
if(DataProvider.Schema.Tables.Count == 0)
{
    DataProvider.Schema.Tables.Add(new ProductsTable(DataProvider));
    DataProvider.Schema.Tables.Add(new OrdersTable(DataProvider));
    DataProvider.Schema.Tables.Add(new OrderDetailsTable(DataProvider));
    DataProvider.Schema.Tables.Add(new CategoriesTable(DataProvider));
}
#endregion

Also i've got a warning telling me it will be compile under 4.0 framework but the project is on 3.5.

Any suggestions?

Victor.

Upvotes: 0

Views: 309

Answers (2)

Tubelight
Tubelight

Reputation: 1

I suffered a setback because I had (unknowningly created) 2 tables in db with same names but different qualifiers e.g. [dbo].Table1 and [userX].Table1. After deleting the unnecessary tables it worked smoothly. Also I read another suggestion - in order to isolate data incongruencies - try removing the tables one by one in the ExcludeTables array in settings.ttinclude to see if one or more tables create trouble.

Upvotes: 0

Alessandro
Alessandro

Reputation: 11

Add Structs.tt to your Model folder

Upvotes: 1

Related Questions