using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.EntityFrameworkCore; using CertAuth.Data; using CertAuth.Domain; using CertAuthAdmin.Models; namespace CertAuthAdmin.Pages.TableMstr { public class TableMstrListModel : PageModel { private readonly CertAuth.Data.CertAuthContext _context; private readonly TableMstrDA DA = new TableMstrDA(); [BindProperty] public IList TableMstrWD { get; set; } [BindProperty(Name = "editID", SupportsGet = true)] public int editID { get; set; } [BindProperty(Name ="TableCode")] public string TableCode { get; set; } public TableMstrListModel(CertAuth.Data.CertAuthContext context) { _context = context; } public IList TableMstr { get;set; } public async Task OnGetAsync() { //TableMstr = await _context.TableMstr.ToListAsync(); TableMstrWD = (IList)DA.GetAll_WD().ToList(); } } }