예제 #1
0
        /// <summary>
        /// Index method for home page.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            HomeViewModel model = new HomeViewModel();

            model.UserLoginName = claimsHelper.GetUserNameFromClaim((ClaimsIdentity)User.Identity);

            CheckAllPostsForExpirationDateCommand command = new CheckAllPostsForExpirationDateCommand();

            commandBus.Execute(command);

            return(View("Index", model));
        }
예제 #2
0
 /// <summary>
 /// Handler for the CheckAllPostsForExpirationDateCommand command
 /// </summary>
 /// <param name="command">the CheckAllPostForExirationDate Command</param>
 public void HandleCommand(CheckAllPostsForExpirationDateCommand command)
 {
     postRepository.CheckAllPostsForExpirationDate();
 }