安装
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddDbContext(options =>
options.UseSqlServer(Configuration.GetConnectionString(“MvcMovieContext”)));
}
DbContextOptionsBuilder不包含UseSqlServer的定义
最新推荐文章于 2024-07-30 15:36:58 发布