views:

21

answers:

1

I'm following the Migration video posted at http://subsonicproject.com/docs/Using_SimpleRepository

I've downloaded the latest SubSonic (3.0.0.4), and extracted/referenced the SubSonic.Core.dll in my empty Console Application project in VS 2010.

I've created a 001_Init.cs file in the Migrations folder:

using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using SubSonic;

namespace SubSonic.Migrations
{
    class _001_Init : Migration
    {
    }
}

But I'm getting:

Error 1 The type or namespace name 'Migration' could not be found (are you missing a using directive or an assembly reference?) C:\dev\SubSonic\SubSonic\Migrations\001_Init.cs 9 23 SubSonic

In my Program.cs file I've managed to add a few rows to my DB via var repo = new SimpleRepository("Northwind"); so I know the dll is referenced properly.

What am I missing? Alternatively, is there documentation about this that I'm not seeing?

+1  A: 

Migrations are a SubSonic 2 feature that has not been ported to SubSonic 3.

http://subsonicproject.com/docs/Migrations

SubSonic 3's SimpleRepository has a Migration feature that does not give you the same control (it just compares your current DTO's and calculates what steps are needed to convert the corresponding database scheme to match them.

http://subsonicproject.com/docs/3.0_Migrations

However, since migrations are a standalone feature that can be used with or without subsonic itself, I would suggest you use subsonic 2's sonic.exe to execute your migrations and use SubSonic 3 for the rest.

SchlaWiener