-1

The tutorial I'm (was) following, they have an option to select "using Microsoft entity framework" but for me, it does not show that potential fix, any advice would be much appreciated.

 services.AddMvc(); services.AddDbContext<NewContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); } 

Error message screen shot

1
  • Please read How to Ask and show what you have tried. Commented Mar 14, 2021 at 16:30

1 Answer 1

0

Your project needs to have the entity framework libraries referenced.

Try adding the "Microsoft.EntityFrameworkCore.SqlServer" nuget package to your project. Then add the using directive.

Sign up to request clarification or add additional context in comments.

4 Comments

I already have it downloaded at the start of the project
what do you mean by "downloaded"? Is it shown in your project references?
Hi, I am so sorry - you were right yes what I did was I had "Microsoft.EntityFrameworkCore" not "Microsoft.EntityFrameworkCore.SqlServer" now I just installed it and it fixed the issue thank you very much
you are welcome. Please consider marking this as answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.