Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Contoso University - DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer'

$
0
0

I am trying to work through the Contoso University example application.  I have simply copied the Startup.cs class statements:

services.AddDbContext<SchoolContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));

I receive the error:

DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no accessible extension method. 'UseSqlServer' accepting a first argument of type 'DbContextOptionBuilder' could be found ( are you missing a using directive or an assemply reference)

What do I need to do to move forward?

Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>