public RedirectToRouteResult Delete(string topicName) { TopicModel topic = _topicRepository.GetByName(topicName); if (!_topicRepository.IsUsedTopic(topicName)) { _topicRepository.Delete(topic); _topicRepository.Save(); return(RedirectToAction("Index", "Home")); } return(RedirectToAction("Index")); }