﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Portfolio.Models;

namespace Portfolio.Controllers
{
    public class SharedController : Controller
    {
        private readonly PortfolioContext context;

        public SharedController()
        {
            context = new PortfolioContext();
        }

        public PartialViewResult Header()
        {
            var model = context.FrontPages.First();

            return PartialView(model);
        }

        public PartialViewResult Footer()
        {
            var model = context.FrontPages.First();

            return PartialView(model);
        }

    }
}
