public IActionResult Overdue()
        {
            if (int.TryParse(_userManager.GetUserId(User), out int UserID))
            {
                List <Task> allTasksForUser = tasksDAL.GetAllTasksByUserID(UserID).ToList();

                ViewData["allTasks"] = allTasksForUser.FindAll(t => t.DueDate <= DateTime.Now);
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }


            return(View("Index"));
        }
        public IActionResult Index()
        {
            if (int.TryParse(_userManager.GetUserId(User), out int UserID))
            {
                ViewData["allTasks"] = tasksDAL.GetAllTasksByUserID(UserID);
            }
            else
            {
                return(RedirectToAction("Login", "Account"));
            }


            return(View());
        }