I am using ASP.NET Core and I want to create a connection with the SQL Server.
services.AddDbContext<BookStoreDbContext>(options =>
{
options.UseSqlServer(configuration.GetConnectionString("Sqlcon"));
}
but I get this error
Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no accessible extension method 'UseSqlServer' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?)