DEV Community

Gishan Chaminga Abeysinghe
Gishan Chaminga Abeysinghe

Posted on

1

Learning .NET

Here are my learnings of .Net,

I got the chance to work in a C# project and I had to learn things from the beginning.

first I installed the .Net sdk, to check the version you can use following command in the terminal

dotnet --version

I used docker to install the sqlserver

docker run -e ACCEPT_EULA=Y -e SA_PASSWORD=YourStrong@Passw0rd -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2022-latest

then I had to migrate the database. for that we need a dotnet tool called dotnet-ef, we have to install it first

dotnet tool install --global dotnet-ef

you can get more idea about the dotnet-ef by using --help as follows

dotnet ef --help

to do the database migration

dotnet ef database update --project [project-name].Infrastructure --startup-project [project-name]

to run the project

dotnet run --project [project-name]

to run the project with launch profile you can use

dotnet run --project [project-name] --launch-profile https

there are three launch profiles

  1. default
  2. http
  3. https

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay