Initial commit
This commit is contained in:
commit
77d35ff965
51 changed files with 5591 additions and 0 deletions
28
Pages/Setup/Database.cshtml.cs
Normal file
28
Pages/Setup/Database.cshtml.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue