public virtual ActionResult Index()
 {
     ScrumTimeEntities scrumTimeEntities = new ScrumTimeEntities();
     string currentProductName = "None";
     string currentSprintName = "None";
     string nextReleaseName = "None";
     ProductService productService = new ProductService(scrumTimeEntities);
     Product product = productService.GetProductById(SessionHelper.GetCurrentProductId(User.Identity.Name, Session));
     if (product != null && product.ProductId > 0)
     {
         currentProductName = product.Name;
         SprintService sprintService = new SprintService(scrumTimeEntities);
         Sprint sprint = sprintService.GetSprintById(SessionHelper.GetCurrentSprintId(User.Identity.Name, Session));
         if (sprint != null && sprint.SprintId > 0)
         {
             currentSprintName = sprint.Name;
             ReleaseService releaseService = new ReleaseService(scrumTimeEntities);
             Release nextRelease = releaseService.GetNextReleaseEqOrAfterDate(sprint.ProductId, sprint.FinishDate);
             if (nextRelease != null && nextRelease.ReleaseId > 0)
                 nextReleaseName = nextRelease.Name;
         }
     }
     DashboardViewModel dashboardViewModel = new DashboardViewModel()
     {
         CurrentProductName = currentProductName,
         CurrentSprintName = currentSprintName,
         NextReleaseName = nextReleaseName
     };
     return PartialView(dashboardViewModel);
 }
 public ReleaseController()
 {
     _ScrumTimeEntities = new ScrumTimeEntities();
     _ReleaseService = new ReleaseService(_ScrumTimeEntities);
     _ProductService = new ProductService(_ScrumTimeEntities);
 }
 public ScheduleController()
 {
     _ScrumTimeEntities = new ScrumTimeEntities();
     _SprintService = new SprintService(_ScrumTimeEntities);
     _ReleaseService = new ReleaseService(_ScrumTimeEntities);
 }