BolfTracker.Web.Controllers.HoleController.Index C# (CSharp) Method

Index() public method

public Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult Index()
        {
            int month = DateTime.Today.Month;
            int year = DateTime.Today.Year;

            var holesStatistics = _holeService.GetHoleStatistics(month, year);
            var lifetimeHoleStatistics = _holeService.GetHoleStatistics();

            return View("Holes", new HolesViewModel(month, year, holesStatistics, lifetimeHoleStatistics));
        }