Question : The type or namespace name 'MovieContext' could not be found (are you missing a using directive or an assembly reference?)
Answered by : tom-zk99pilqv6hu
if (Environment.IsDevelopment()) { services.AddDbContext<RazorPagesMovieContext>(options => options.UseSqlite( Configuration.GetConnectionString("MovieContext"))); } else { services.AddDbContext<RazorPagesMovieContext>(options => options.UseSqlServer( Configuration.GetConnectionString("MovieContext"))); }
Source : | Last Update : Thu, 11 Jun 20