using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using SPWA.DataAccess.Data.Models;
using SPWA.Models;

namespace SPWA.Pages.Termn
{
    public class IndexModel : PageModel
    {
        private readonly SPWA.Models.SPWAContext _context;

        public IndexModel(SPWA.Models.SPWAContext context)
        {
            _context = context;
        }
        
        public IList<Term> Term { get;set; }

        public async Task OnGetAsync()
        {
            Term = await _context.Term.ToListAsync();
        }
    }
}
