I'm trying to create a new database using Visual Studio 2012 NuGet package manager console. I have done all the steps to enable migration, the Migrations folder was successfully created, and its configuration class was defined as the next:

internal sealed class Configuration : DbMigrationsConfiguration<MyMVC4Project.Infrastructure.CategoryDb>
{
    public Configuration()
    {
        AutomaticMigrationsEnabled = true;
    }

    protected override void Seed(MyMVC4Project.Infrastructure.CategoryDb context)
    {
        context.Categories.AddOrUpdate(d => d.Name,
            new Department() {Name = "dishes"},
            new Department() {Name = "Appliances"},
            new Department() {Name = "furniture"}
            );
    }
}

PM> update-database -Verbose

At which point I see the error message:

Using StartUp project 'MyMVC4Project'.
Using NuGet project ' MyMVC4Project '.
Specify the '-Verbose' flag to view the SQL statements being applied to the target database.
Target database is: 'MyMVC4Project.Infrastructure.CategoryDb' (DataSource: .\SQLEXPRESS, Provider: System.Data.SqlClient, Origin: Convention).
No pending code-based migrations.
Running Seed method. 

Then no database is created in the App_data folder, I am expecting to find a localDb database not an SQL Express one, then the installed SQL Express instance have a different name than "SQLExpress", and in my web.config the default connection string points to a localDB instance.

Please, how can I resolve this issue?

share|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.