예제 #1
0
        public async Task <IActionResult> SuggestQuestion(SuggestQuestionBindingModel questionSuggestion, string username)
        {
            var suggestQuestion = mapper.Map <QuestionSuggestion>(questionSuggestion);

            await this.questionSuggestionService.SuggestQuestion(suggestQuestion, this.User.Identity.Name);

            return(RedirectToAction("Index", "Home"));
        }
예제 #2
0
        public async Task <IActionResult> SuggestQuestion(SuggestQuestionBindingModel questionSuggestion, string username)
        {
            var suggestQuestion = mapper.Map <QuestionSuggestion>(questionSuggestion);

            await this.questionSuggestionService.SuggestQuestion(suggestQuestion, this.User.Identity.Name);

            await notificationHubContext.Clients.All.SendAsync("sendNotification");

            return(RedirectToAction("Index", "Home"));
        }