HomeController.cs 520 B

12345678910111213141516171819202122
  1. using System.Diagnostics;
  2. using Microsoft.AspNetCore.Mvc;
  3. using WebApplicationSample.Models;
  4. namespace WebApplicationSample.Controllers
  5. {
  6. public class HomeController : Controller
  7. {
  8. /// <summary>
  9. /// 前言
  10. /// </summary>
  11. public IActionResult Index()
  12. {
  13. return View();
  14. }
  15. public IActionResult Error()
  16. {
  17. return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
  18. }
  19. }
  20. }