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; namespace CertAuthAdmin.Pages.VendorMstr { public class VendorListModel : PageModel { private readonly CertAuth.Data.CertAuthContext _context; private readonly Controllers.VendorMstrController Cntrlr; public VendorListModel(CertAuth.Data.CertAuthContext context) { _context = context; Cntrlr = new Controllers.VendorMstrController(_context); } [BindProperty] public IList VendorMstr { get; set; } public IList VendorMstrWD { get; set; } [BindProperty(Name = "editID", SupportsGet = true)] public int editID { get; set; } public async Task OnGetAsync() { //VendorMstr = await _context.VendorMstr.ToListAsync(); VendorMstrWD = Cntrlr.GetAll_WD().ToList(); } } }