сделал readme на русском
This commit is contained in:
parent
28eb54070a
commit
0f710abf3c
17
README.md
17
README.md
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
# ApiService
|
# ApiService
|
||||||
|
|
||||||
Database connection in appsettings.json:
|
Строка подключения в appsettings.json:
|
||||||
username:postgres
|
username:postgres
|
||||||
password:postgres
|
password:postgres
|
||||||
host:localhost
|
host:localhost
|
||||||
@ -12,7 +12,7 @@ Database connection in appsettings.json:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if no migrations
|
Если нет миграций в проекте то в папке HackathonPreparing.ApiService нужно писать:
|
||||||
|
|
||||||
dotnet ef migrations add UserContextMigration --context UserContext
|
dotnet ef migrations add UserContextMigration --context UserContext
|
||||||
dotnet ef database update --context UserContext
|
dotnet ef database update --context UserContext
|
||||||
@ -20,11 +20,16 @@ dotnet ef database update --context UserContext
|
|||||||
dotnet ef migrations add WeatherForecastContextMigration --context WeatherForecastContext
|
dotnet ef migrations add WeatherForecastContextMigration --context WeatherForecastContext
|
||||||
dotnet ef database update --context WeatherForecastContext
|
dotnet ef database update --context WeatherForecastContext
|
||||||
|
|
||||||
and etc for each dbcontext in project
|
И так для каждого DbContext в проекте
|
||||||
|
|
||||||
if you have Migrations folder in ApiService project just call (in dev mode app) post: /api/db/migrate
|
Если в папке HackathonPreparing.ApiService есть папка Migrations и там есть миграции то можно просто сделать запрос post: /api/db/migrate.
|
||||||
|
Все запросы к маршрутам /api/db/... доступны только в dev моде
|
||||||
/api/swagger - path to swagger
|
|
||||||
|
|
||||||
|
|
||||||
|
/api/swagger - путь к свагеру
|
||||||
|
|
||||||
|
из свагера в dev моде можно запустить миграции в /api/db/migrate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user