1,命令

2,模板

3,更换启动浏览器

4,vscode使用nuget

5,使用ef migration

6,配置.net core的工作目录

7,使用dotnet ef migrations命令

8,指定migration生成的目录

9,vscode使用Bower

10,引用项目 

 

 

1,命令

 dotnet new --help 查询命令帮助

 D:\github\test2>dotnet run 启动web程序

 dotnet build 编译代码

 dotnet restore 还原包

 dotnet publish 发布项目

 

2,模板

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using test3.Models;

namespace test3.Controllers
{
    public class HomeController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";

            return View();
        }

        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}
Controller模板

相关文章:

  • 2022-01-30
  • 2021-08-02
  • 2018-03-23
  • 2022-01-21
  • 2021-04-15
  • 2021-09-05
猜你喜欢
  • 2021-05-24
  • 2022-12-23
  • 2021-04-08
  • 2021-06-03
相关资源
相似解决方案