I have a asp.net MVC3 project using EF code-first. For my unit testing I have been using SQL Server CE 4.0 and SQL Server 2008 Express. Both have worked perfectly with EF ge
In my case, my connection string name must match the context class name.
Connection String:
Context Class:
using System.Data.Entity;
namespace Nunu.Models
{
public class NunuContext : DbContext
{
System.Data.Entity.DropCreateDatabaseIfModelChanges());
public DbSet NunuFirsts { get; set; }
public DbSet NunuLasts { get; set; }
}
}