zoukankan      html  css  js  c++  java
  • Asp.net core 学习笔记 dotnet & azure 常用 command

    因为很少用, 容易忘记所以记入起来, 方便找

    Start, Run, Publish Project

    dotnet new webapp -o simple-test (razor page project)

    dotnet new web -o simplete-test (empty project)

    dotnet dev-certs https --trust (弄一次就可以了)

    dotnet watch run

    dotnet publish Project.csproj -o C:keatkeatprojects elease (-o 是 output path, csproj 是需要选一个)

    add, list package
    dotnet add package Azure.Storage.Blobs

    dotnet add Project.csproj package Azure.Storage.Blobs (如果是多个 project 的话就要加 ProjectName.csproj)

    dotnet list package | dotnet list Project.csproj package

    User Secret
    dotnet user-secrets init
    dotnet user-secrets set "password" "123456" --project "C:appsWebApp1srcWebApp1"
    dotnet user-secrets list
    dotnet user-secrets remove "password"
    dotnet user-secrets clear

    Ef core

    dotnet tool update dotnet-ef --global

    dotnet ef migrations add init -c ApplicationDbContext -o Migrations/App

    dotnet ef migrations add adjust68 -c ApplicationDbContext -o Migrations/App

    dotnet ef database update -c ApplicationDbContext

    dotnet ef migrations remove -c ApplicationDbContext

    Azure key-vault and secret

    az group create --name "klc-resource-group" --location "SoutheastAsia"

    az keyvault create --name "klc-test-key-vault" --resource-group "klc-resource-group" --location "Southeast Asia"

    az keyvault secret set --vault-name "klc-test-key-vault" --name "Password" --value "123456"

  • 相关阅读:
    在Linux下删除文件及文件夹(rm)
    修改Linux文件权限
    文件分页显示(ls -al |more)
    linux的文件权限
    Linux中的重启(reboot)
    linux关机前同步数据(sync)
    hdu4990 Reading comprehension 矩阵快速幂
    hdu4965 Fast Matrix Calculation 矩阵快速幂
    hdu4847 Wow! Such Doge! KMP
    hdu4705 Y 树形DP
  • 原文地址:https://www.cnblogs.com/keatkeat/p/14399650.html
Copyright © 2011-2022 走看看