- Privacy.cshtml shows random items from postgres - Proper tables names in DataAccess sql strings
27 lines
610 B
C#
27 lines
610 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Serilog;
|
|
using WretchedMachines.DataAccess;
|
|
using WretchedMachines.DataAccess.Entities;
|
|
|
|
namespace WretchedMachines.Pages;
|
|
|
|
public class PrivacyModel : PageModel
|
|
{
|
|
private readonly IDataAccess dataAccess;
|
|
public IEnumerable<Item>? Items {get; set;}
|
|
|
|
public PrivacyModel(IDataAccess dataAccess)
|
|
{
|
|
this.dataAccess = dataAccess;
|
|
this.Items = new List<Item>();
|
|
}
|
|
|
|
public void OnGet()
|
|
{
|
|
Items = dataAccess.GetItems();
|
|
Log.Information(Items!.Count().ToString());
|
|
}
|
|
}
|
|
|