3

Is there a ways for EF Core to create the database but not the tables, as all I need is the database to be made, and then run fluent migrator to do the actual migrations?

Many thanks in advance

4
  • 1
    Why use EF Core at all for this? Just run an ADO.NET query Commented Feb 12, 2020 at 15:06
  • 1
    Do you mean an empty database, or a database with something in it (procedures? views?), just not tables? In the former case a CREATE DATABASE foo statement would be sufficient. EF probably has an appropriate place to hook that somewhere, but if not you could certainly just run that as a plain old SQL command. Commented Feb 12, 2020 at 15:06
  • 1
    EF core works off a database and manages tables via CodeFirst or DBFirst. Dont think EF can do what you are looking to do
    – Jawad
    Commented Feb 12, 2020 at 15:09
  • Ok ill just make the SqlConnection directly then, Thanks for the help
    – Andrew
    Commented Feb 12, 2020 at 15:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.