I created a new project using Asp.Net MVC with EF, and did not configure the connection string property with the same name as the context class: DbContext in Web.config.
Rodei enable-migrations - > worked successfully
Rodei add-migration NomeMigration - > It worked fine
Rodei update-database - > worked successfully.
But did not create in the database that I had specified in Web.config, and when trying to run the update-database return that is unresolved to execute.
I wanted to understand in this case it saves where that information?
This is my Web.config in the connection part.
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="conexao" connectionString="Data Source=localhost;Initial Catalog=bancoDB;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
My Context class
using System;
namespace AppWeb2.Models
{
public class Mycontext : DbContext
{
//Classes a ser mapeadas
public DbSet<Pessoa> Pessoa { get; set; }
}
}