.NET Core第7天_MVC專案跟空專案創建出來比較_跟.net MVC專案做小比較
這是.net core 空專案創建出來預設項目 .NET Core MVC專案創建方式 可以看到預設直接選擇MVC類型專案會幫我們自動建立出Model,Controller,View的folder 當中的HomeController.cs 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 using AppNetCore5MVC.Models ; using Microsoft.AspNetCore.Mvc ; using Microsoft.Extensions.Logging ; using System ; using System.Collections.Generic ; using System.Diagnostics ; using System.Linq ; using System.Threading.Tasks ; namespace AppNetCore5MVC.Controllers { public class HomeController : Controller { private readonly ILogger<HomeController> _logger; public HomeController (ILogger<HomeController> logger) { _logger = logger; } public IActionResult Index () { return View (); } public IActionResult Privacy () { return View (); } [ResponseCache(Duration = 0, Location = ResponseCacheLocat