C
C#•2y ago
Seth

Entity Framework DbContextOptionsBuilder.UseSqlServer() missing definition

I just installed the newest version of Entity Framework (6.0.9) and am inside my program.cs trying to run this line builder.Services.AddDbContext<MyDbContext>(options => options.UseSqlServer(blah blah); But DBContextOptionsBuilder is complaining saying that definition doesn't exist. I am using Microsoft.EntityFrameworkCore package and can see other DBContextOptionsBuilder definitions but not this one. I am very new to ASP.NET and Entity Framework.
2 Replies
Saber
Saber•2y ago
you also need Microsoft.EntityFrameworkCore.SqlServer
Seth
Seth•2y ago
There it goes, thanks 🤙