/// <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)); }
/// <summary> /// Handler for the CheckAllPostsForExpirationDateCommand command /// </summary> /// <param name="command">the CheckAllPostForExirationDate Command</param> public void HandleCommand(CheckAllPostsForExpirationDateCommand command) { postRepository.CheckAllPostsForExpirationDate(); }