Code Monkey home page Code Monkey logo

asp.net_sample's Introduction

/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P password
CREATE DATABASE database_name
GO

/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Your_password123 -Q "CREATE DATABASE testdb;"

Package

https://www.nuget.org/packages

Add a package to .csproj file Example:

<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />

Cmd:

dotnet list package
# Install
dotnet pack
dotnet restore

Setup https for Docker

Run command App in Docker

dotnet dev-certs https -ep aspnetapp.pfx -p mypassword123

Copy aspnetapp.pfx to /https

Add to Environment file

ASPNETCORE_ENVIRONMENT=Development
ASPNETCORE_HTTPS_PORT=5001
ASPNETCORE_URLS=https://+:5001;http://+:5000
DOTNET_USE_POLLING_FILE_WATCHER=1
ASPNETCORE_Kestrel__Certificates__Default__Password=mypassword123
ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx
dotnet dev-certs https --clean
dotnet dev-certs https --trust

Docs

https://www.mattbutton.com/docker-for-web-developers/

Dockerfile for production https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-5.0#the-dockerfile

asp.net_sample's People

Contributors

tanphongtr avatar

Watchers

 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.