сделал readme на русском
This commit is contained in:
		
							
								
								
									
										27
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								README.md
									
									
									
									
									
								
							@@ -3,16 +3,16 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# ApiService
 | 
					# ApiService
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Database connection in appsettings.json:
 | 
					Строка подключения в appsettings.json:
 | 
				
			||||||
    username:postgres
 | 
					username:postgres
 | 
				
			||||||
    password:postgres
 | 
					password:postgres
 | 
				
			||||||
    host:localhost
 | 
					host:localhost
 | 
				
			||||||
    port:5432
 | 
					port:5432
 | 
				
			||||||
    database:prod
 | 
					database:prod
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user