コード例 #1
0
        public ViewResult FilterByWhatToDo(string whatToDoContainsThis)
        {
            if (whatToDoContainsThis == string.Empty)
            {
                return(Index());
            }

            string userName = new LoggedInUserFinder().GetLoggedInUserName();

            var toDosFound = new ToDoSelector().GetToDosThatIsLikeWhatToDo(whatToDoContainsThis, userName);

            return(View(nameof(Index), toDosFound));
        }
コード例 #2
0
        public ViewResult Index()
        {
            string userName = new LoggedInUserFinder().GetLoggedInUserName();

            return(View(nameof(Index), new ToDoSelector().GetSortedToDosByLoggedInUserName(userName)));
        }