Each .NET Core project should contain the file “settings.yaml” which is a setting template. Based on this file you can understand what external dependencies the current project has. First yaml node indicates the current project and it’s internal dependencies like database, cache or queue broker. Other nodes that usually contain “ServiceUrl”, “ServiceClient” are pointing to other services.
Each .NET Core project should contain file “settings.json” which is a configuration file based on the “settings.yaml” template. You should modify this file locally (do not forget to add this file to .gitignore) and pass all setting values it requires which can be:
-
Microsoft SQL Server connection string. Set up instruction
-
Redis connection string. Set up instruction
-
RabbitMQ connection string. Set up instruction
-
AzureStorage connection string. Set up instruction
-
Dependent service URL. Set up instruction
Now when project settings are configured we are ready to run the project. In order for the project to run with local “settings.json” you need to point the project to this file using an environment variable called “SettingsUrl”.
Some projects require an additional environment variable called “ENV_INFO” which should contain any identification of you. This value is used when you are connecting to a development kubernetes cluster using VPN.
Each .NET Core project is HTTP API service. So it does not have a personal GUI to interact with. But you should be able to send requests to it and get responses using Swagger UI (general information about Swagger UI which is hosted on [http|https]://[yourhost]:[port]/swagger/ui.
For example, default service url will be: http://localhost:5000/swagger/ui/
- Commands to intstall ef
dotnet --version
dotnet tool install --global dotnet-ef
dotnet ef
- Command to add migration
dotnet ef migrations add MigrationName --verbose
then to paste connection string, e.g. Server=(localdb)\\MSSQLLocalDB,1433;Database=openmavn;User Id=localdb;Password=localdb;