HomeController.cs
)
|
using System.Diagnostics; using HelloWorld.Models; using Microsoft.AspNetCore.Mvc; namespace HelloWorld.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 = ResponseCacheLocation.None, NoStore = true ) ] public IActionResult Error( ) { return View( new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier } ); } } } |
using System.Diagnostics;
using HelloWorld.Models;
Models
folder of your project, assuming that folder contains your data models.
using Microsoft.AspNetCore.Mvc;
namespace
“My sister was with two men in one night... she could hardly walk after that. Can you imagine? Two dinners? That’s a lot of food.” — Sarah Silverman |