EntityFramework中的数据库连接字符串
class EfDbContext : DbContext
{
public EfDbContext() : base(@"Data Source=PAUL\PAUL;Integrated Security = true") { }
public DbSet<Hero> Heros { get; set; }
public DbSet<Race> Races { get; set; }
}
——————————————————————————————————————
本地数据库实例名不是默认的,所以貌似不能在不提供连接字符串的情况下映射数据库(code first),求大神指点~~~thanks in advance!