2020-09-15 12:31:52 +00:00
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using Snootalogue.Models;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Snootalogue.Data;
|
|
|
|
|
|
|
|
namespace Snootalogue.Pages {
|
|
|
|
public class IndexModel : PageModel {
|
2020-09-16 02:14:31 +00:00
|
|
|
private readonly SnootalogueContext _context;
|
2020-09-15 12:31:52 +00:00
|
|
|
public IList<Document> Documents { get; set; }
|
|
|
|
public string Search { get; set; }
|
|
|
|
|
|
|
|
public IndexModel(SnootalogueContext context) {
|
2020-09-16 02:14:31 +00:00
|
|
|
_context = context;
|
2020-09-15 12:31:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public async Task OnGetAsync() {
|
2020-09-16 02:14:31 +00:00
|
|
|
Documents = await _context.Document.ToListAsync();
|
2020-09-15 12:31:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|