Notes/Controllers/HomeController.cs

21 lines
427 B
C#
Raw Normal View History

2022-11-29 15:14:15 +00:00
using Microsoft.AspNetCore.Mvc;
namespace BinaryDad.Notes.Controllers;
public class HomeController : Controller
{
private readonly string filePath;
public HomeController(IConfiguration configuration)
{
filePath = configuration["ContentFilePath"];
}
public IActionResult Index()
{
var content = System.IO.File.ReadAllText(filePath);
return View((object)content);
}
}