public RedirectToRouteResult RemoveFavorite(int id)
        {
            var user  = this.CurrentUser();
            var topic = _topicService.Get(id);

            _favoriteTopicService.RemoveFavoriteTopic(user, topic);
            return(RedirectToAction("Topics"));
        }
Пример #2
0
        public ActionResult RemoveFavorite(int id)
        {
            var user  = _userRetrievalShim.GetUser(HttpContext);
            var topic = _topicService.Get(id);

            _favoriteTopicService.RemoveFavoriteTopic(user, topic);
            return(RedirectToAction("Topics"));
        }
Пример #3
0
        public async Task <ActionResult> RemoveFavorite(int id)
        {
            var user  = _userRetrievalShim.GetUser();
            var topic = await _topicService.Get(id);

            await _favoriteTopicService.RemoveFavoriteTopic(user, topic);

            return(RedirectToAction("Topics"));
        }