SHAH MD IMRAN HOSSAIN
SHAH MD IMRAN HOSSAIN

Reputation: 2889

'SchoolContext.OnConfiguring(DbContextOptionsBuilder)': no suitable method found to override

I am working with ASP.NET core 2.0 console application

I am on entity framework core 2.0 and I am having error

'SchoolContext.OnConfiguring(DbContextOptionsBuilder)': no suitable method found to override

And

I can't find my project.json file

there's lot of solution to work out with project.json file

but i don't see it anywhere

ERROR MSG

I am stuck for 3 hours now

there's a link I have been following

http://www.entityframeworktutorial.net/efcore/entity-framework-core-console-application.aspx

Upvotes: 0

Views: 3647

Answers (1)

Shaban Isa
Shaban Isa

Reputation: 11

To override OnModelCreating and OnConfiguring methods, you need to have installed a NuGet package called Microsoft.EntityFrameworkCore.SqlServer.

You can do it when you right click on Solution -> NuGet Packages -> Install -> Microsoft.EntityFrameworkCore.SqlServer.

Upvotes: 1

Related Questions