Exemplo n.º 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"));
        }
Exemplo n.º 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"));
        }