Skip to content

albinronnkvist/Course_DT071G_ProgrammingInCSharpDotNET

Repository files navigation

DT071G - Programming in C# .NET

Development environment

  • VS Code with the following extensions:
    • ms-dotnettools.csharp
    • jchannon.csharpextensions
  • .NET 6.0 SDK
  • ASP.NET Core Web API
  • EF Core
  • SQL Server
  • SQL Server Management Studio (SSMS)

Setup

  • Configure EF Core and add a database connection:
    • Create a database connection using SSMS.
    • Add the database connection string to appsettings.json or in a user-secret:
    "ConnectionStrings": {
      "DefaultConnection": "Data Source=(localdb)\\MSSQLLocalDB; Initial Catalog={db_name}; User ID={db_username}; Password={db_password};"
    }
    
    • Install EF tools: dotnet tool install --global dotnet-ef
    • Run the EF Core migrations: dotnet ef database update
  • Add a signing key to appsettings.json or in a user-secret:
"TokenSettings": {
  "SigningKey": "{your_secure_signing_key_with_atleast_16_characters}"
}

Demo and essay

About

A Web API created with ASP.NET Core

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages