[please close wrong place to post]DbContext optionsBuilder.UseSqlServer missing reference
Hello, I am sorry for the basic issue but there is no where else to get help on Blazor,
I am trying to make a DbContext class and when I try to use optionsBuilder.UseSqlServer("connection string") I get an error stated below
I am trying to add the reference Microsoft.EntityFrameworkCore.SqlServer but there is no option for it in the dependencies reference manager, and simply typing using Microsoft.EntityFrameworkCore.SqlServer; does not work either.
I tried to use nuget package manager to install the sql server package, and i get a warning stating I downgraded and that it was restored, yet I do not see it installed as a nuget package so I assume that the project template comes with it pre installed yet I am still getting this error. Please help.
Error CS1061 'DbContextOptionsBuilder' does not contain a definition for 'UseSqlServer' and no extension method 'UseSqlServer' accepting a first argument of type 'DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?) BlazorCRUD.Shared C:\Users\User\Desktop\BlazorCRUD\BlazorCRUD.Shared\DataAccess\EmployeeContext.cs 15 Active
Is this the server side of an ASP.NET Core hosted blazor app or are you trying to run EF in the browser? While i don't know if EF can run in the Browser, the SqlServer client definitely does not as it relies on Socket connections. If this question is about EF on the server side, it's not blazor specific.
Ah i suppose youre right. It is on the server side, sorry is there a way to remove this?