using Microsoft.AspNetCore.Mvc.RazorPages; namespace PlanTempusAdmin.Pages.Setup; public class DatabaseModel : PageModel { private readonly IWebHostEnvironment _environment; public string SqlSchema { get; set; } = string.Empty; public DatabaseModel(IWebHostEnvironment environment) { _environment = environment; } public void OnGet() { var schemaPath = Path.Combine(_environment.ContentRootPath, "Scripts", "backup-logs.sql"); if (System.IO.File.Exists(schemaPath)) { SqlSchema = System.IO.File.ReadAllText(schemaPath); } else { SqlSchema = "-- Schema not found at: " + schemaPath; } } }