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?
Why use EF Core at all for this? Just run an ADO.NET query
- Panagiotis Kanavos
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.
- Jeroen Mostert
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
Ok ill just make the SqlConnection directly then, Thanks for the help
- Andrew
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
CREATE DATABASE foostatement 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. - Jeroen Mostert