Last post Jan 25, 2020 09:12 AM by DA924
Jan 24, 2020 07:37 PM|jsm01|LINK
Background info: https://devblogs.microsoft.com/dotnet/announcing-entity-framework-6-3-preview-with-net-core-support/
Linked files scenario also mentioned here: https://docs.microsoft.com/en-us/ef/ef6/what-is-new/
In short, I am looking to do this but with a .NET Core web application: https://github.com/efcore/EdmxDotNetCoreSample
With this being recently supported in EF 6.3+, I was hoping to find an example to reference for setting up this scenario with a web app. This documentation appears to be out of date but seems to be the closest to where I should be looking:
We need to remain Database First but I would like to leverage .NET Core for a smaller project, which I believe is possible now.
Would appreciate any insight on implementing this, thanks for any guidance!
Jan 24, 2020 08:37 PM|DA924|LINK
EF Core has the existing database approach, which is not unlike EF 6 DB first, but Core uses no messy EDMX. And EF Core has the EF Core power tools that has a graphical interface that allows the selection of tables, which it too is not unlike the Entity
model designer used by EF 6 DB first.
There should be no need to use EF 6.3 + 1 for a new Core program that needs to build the EF model from an existing database.
Jan 24, 2020 08:58 PM|jsm01|LINK
Thanks for the suggestion DA, my understanding with EF Core was the existing database approach was intended as a way of generating the classes initially and then being driven into a code first approach for any further maintenance.
It sounds like I could use the EF Core existing database approach and maintain it (similar to updating the model from database in the EDMX) using the EF Core Power Tools if need be. I will look into this more, sounds like a much better approach.
Jan 25, 2020 09:12 AM|DA924|LINK
One could take a code first approach and directly maintenance the existing model manually after initially scaffolding the model from an existing database. One can also just make changes to the existing database schema, scaffold the new model to a staging
folder, and copy/paste changes to the existing model in use and not destroy any special things the existing model in use may have implemented.