public RedirectToRouteResult RemoveFavorite(int id) { var user = this.CurrentUser(); var topic = _topicService.Get(id); _favoriteTopicService.RemoveFavoriteTopic(user, topic); return(RedirectToAction("Topics")); }
public ActionResult RemoveFavorite(int id) { var user = _userRetrievalShim.GetUser(HttpContext); var topic = _topicService.Get(id); _favoriteTopicService.RemoveFavoriteTopic(user, topic); return(RedirectToAction("Topics")); }
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")); }