BolfTracker.Web.Controllers.HoleController.Index C# (CSharp) 메소드

Index() 공개 메소드

public Index ( ) : System.Web.Mvc.ActionResult
리턴 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));
        }