Code Monkey home page Code Monkey logo

dialogporten's Introduction

Dialogporten

Getting started with local development

Prerequisites

You can run the entire project locally using docker compose.

docker compose up

If you need do debug the WebApi project in an IDE, you can alternatively run docker compose without the WebAPI.
First create a dotnet user secret for the DB connection string.

dotnet user-secrets set -p .\src\Digdir.Domain.Dialogporten.WebApi\ "Infrastructure:DialogDbConnectionString" "Server=localhost;Port=5432;Database=Dialogporten;User ID=postgres;Password=supersecret;"

Then run docker compose without the WebAPI project.

docker compose -f docker-compose-no-webapi.yaml up 

DB development

This project uses Entity Framework core to manage DB migrations. DB development can ether be done through Visual Studios Package Manager Console (PMC), or through the CLI.

DB development through PMC

Set Digdir.Domain.Dialogporten.Infrastructure as startup project in Visual Studios solution explorer, and as default project in PMC. You are now ready to use EF core tools through PMC. Run the following command for more information:

Get-Help about_EntityFrameworkCore

DB development through CLI

Install the CLI tool with the following command:

dotnet tool install --global dotnet-ef

You are now ready to use EF core tools through CLI. Run the following command for more information:

dotnet ef --help

Remember to target Digdir.Domain.Dialogporten.Infrastructure project when running the CLI commands. Either target it throguh the command using the -p option, i.e.

dotnet ef migrations add -p .\src\Digdir.Domain.Dialogporten.Infrastructure\ TestMigration

or change your directory to the infrastructure project, and then run the command.

cd .\src\Digdir.Domain.Dialogporten.Infrastructure\
dotnet ef migrations add TestMigration

dialogporten's People

Contributors

magnussandgren avatar oskogstad avatar elsand avatar renovate[bot] avatar altinnadmin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.