using BHServer.Data;
using BHServer.Models;
using Microsoft.AspNetCore.Mvc;
using System;

namespace BHServer.Controllers
{
    public class ProvinceController : Controller
    {
        private readonly ApplicationDbContext _db;
        public ProvinceController(ApplicationDbContext db)
        {
            _db = db;
        }
        public IActionResult Index()
        {
            List<Province> ObjectProvinceList = _db.Provinces.ToList();
            // If the above line faulters then ensure SQL Server is running
            return View(ObjectProvinceList);
        }
    }
}
