Answer the question
In order to leave comments, you need to log in
How to connect to a MySQL DB file?
I am working on a project on asp.net core 2.1. I use mysql database and entity framework. There is a need to upload the project to git, so that a person can download, and without changing the connection string, get the project with my database data. Is it possible somehow to pull the database file, drag it into the project folder and connect directly to that file ?
Answer the question
In order to leave comments, you need to log in
There are several ways.
1. Try to use Sqlite
https://docs.microsoft.com/ru-ru/ef/core/get-start...
You will have a database file right in the project
2. Use a docker container if mysql is so critical
https:/ /code-maze.com/mysql-aspnetcore-docker-compose/
When starting the project, you will need to initialize the initial data
https://docs.microsoft.com/ru-ru/ef/core/modeling/...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question