From 0f710abf3c337ee5ec043c26cab92fc07f9adf0f Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 19 Jun 2024 23:36:21 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20readme?= =?UTF-8?q?=20=D0=BD=D0=B0=20=D1=80=D1=83=D1=81=D1=81=D0=BA=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 0fea791..48eaaf1 100644 --- a/README.md +++ b/README.md @@ -3,16 +3,16 @@ # ApiService -Database connection in appsettings.json: - username:postgres - password:postgres - host:localhost - port:5432 - database:prod +Строка подключения в appsettings.json: +username:postgres +password:postgres +host:localhost +port:5432 +database:prod -if no migrations +Если нет миграций в проекте то в папке HackathonPreparing.ApiService нужно писать: dotnet ef migrations add UserContextMigration --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 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 - -/api/swagger - path to swagger +Если в папке HackathonPreparing.ApiService есть папка Migrations и там есть миграции то можно просто сделать запрос post: /api/db/migrate. +Все запросы к маршрутам /api/db/... доступны только в dev моде + + + +/api/swagger - путь к свагеру + +из свагера в dev моде можно запустить миграции в /api/db/migrate