-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dacpac/SSDT Integration #4321
Comments
BTW here is some info on the API for interacting with dacpac http://blogs.msdn.com/b/ssdt/archive/2013/12/23/dacfx-public-model-tutorial.aspx |
The latest daily build of "EF Core Power Tools" allows you to reverse engineer from a Dacpac https://github.com/ErikEJ/SqlCeToolbox/wiki/EF-Core-Power-Tools |
Link to DacPac public model now is here: |
I turned Erik's awesome code into a NuGet package. Now you can do this too: dotnet add package ErikEJ.EntityFrameworkCore.SqlServer.Dacpac
dotnet ef dbcontext scaffold My.dacpac ErikEJ.EntityFrameworkCore.SqlServer.Dacpac |
@bricelam Thank you for that. I think we're pretty far past that in our development. That will only work for early dev, right? I think we'll find that not everything will be representative, need to apply attribute/fluent overrides, and then not be able to run scaffold again without losing our work. I'm still holding out hope that EF team will get to this / #1186 issue. A little less hopeful when I see attempts to adapt code-first to DACPAC tasks, though... Anyway, you've become a staple in my work life, through this window on you. Thanks for the work you've done! |
Functionality is covered by EF Core Power Tools. We don't plan to implement anything here. |
@ajcvickers: |
@AliFayazbakhsh You can create a SQL script from the current model using EF Core Power Tools, and import that into the database project |
@ErikEJ |
and then some |
@ErikEJ |
There are a couple of scenarios here:
Note that I don't think we should look at integrating migrations and dacpac/SSDT in anyway - we should allow folks to use dacpac/SSDT instead of migrations. The main reason for this is that they use fundamentally different approaches to how schema changes are tracked. Migrations is very explicit and has a step by step process to take a schema thru a well ordered set of states (i.e. no schema comparison is done when applying migrations, we just run the exact steps recorded in each migration). Dacpac/SSDT takes a target schema and some other info (like refactor log) to calculate the changes during deployment.
The text was updated successfully, but these errors were encountered: