我不确定应该引用哪个程序集来消除此阻塞错误。
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddDbContext<QAContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
// Add framework services.
services.AddMvc();
}
备注:这是一条关于在使用 SQL Server 数据库时遇到的编译错误的信息。错误 CS1061 'DbContextOptionsBuilder' 不包含定义为 'UseSqlServer' 的内容, 并且没有扩展方法接受类型为 'DbContextOptionsBuilder' 的第一个参数 的 'UseSqlServer' 可以找到(您是否缺少使用指令或程序集引用?)