﻿using System.Web.Mvc;
using Symbio.BestPractice.DotNet.Web.Services;
using Symbio.BestPractice.DotNet.Web.ViewModels;

namespace Symbio.BestPractice.DotNet.Web.Controllers
{
    public class HomeController : Controller
    {
        readonly ISettingsProvider _settingsProvider;

        public HomeController(ISettingsProvider settingsProvider)
        {
            _settingsProvider = settingsProvider;
        }

        [HttpGet]
        [Route("")]
        public ActionResult Get()
        {
            var model = new HomeModel
            {
                Version = _settingsProvider.Version,
                WhereAmI = _settingsProvider.WhereAmI
            };
            return View(model);
        }
    }
}
