How to insert Connection String in a console project in . NET CORE 3.1

Asked

Viewed 112 times

0

appsettings.json in . NET CORE 3.1 no longer exists, has been integrated into . csproj.

I would like to know how to configure my Connection string, the console project in . net core 3.1 is created only with Dependencies and Program.Cs.

Inside the . csproj


  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

<Project>
  • From Count you got this information about appsettings.json in 3.1?

  • See tutorial https://docs.microsoft.com/pt-br/aspnet/core/fundamentals/configuration/? view=aspnetcore-3.1

  • What I found strange is, I passed a code from . net framework 4.6.1 to . net core 3.1, but when creating the console program in 3.1 appsettings.json does not come by default.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.