Evening.
I have to develop an api for an existing SQL Server 2017 database.
I need to use Microsoft Web API, and I would like to use Core 3.1 but I have read I have to use migrations and such, and i have been told not to build the api using migrations.
Would I be better using .Net Framework instead or is there a way to use Core without using migrations?
I hope that it's not too broad a question, but I really am struggling to make a decision so any feedback etc would be greatly appreciated.
carlson
If you'd like to access data from an existing database and tables with Entity Framework (EF) Core in your ASP.NET Core Web API project, you can try to use Scaffold-DbContext command or dotnet ef dbcontext scaffold command to generate code for a DbContext and entity types for your database.

Besides, you can also install and use Microsoft.Data.SqlClient to access your existing SQL Server database in ASP.NET Core project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With