Exemple #1
0
        public async Task <ActionResult> CreateTheme(ThemeModel model)
        {
            ThemeDTO themeDto = new ThemeDTO {
                ThemeDesc = model.ThemeDesc, ThemeTitle = model.ThemeTitle, Id = RandomStringIdGenerator.GetUniqueId()
            };
            await ThemeService.CreateNew(themeDto);

            return(RedirectToAction("Index", "Home"));
        }
Exemple #2
0
        public async Task <ActionResult> CreateQuestion(string themeId, QuestionModel model)
        {
            QuestionDTO questionDto = new QuestionDTO {
                Id         = RandomStringIdGenerator.GetUniqueId(), DatePosted = DateTime.Now,
                PostedUser = User.Identity.Name, QuestionDesc = model.Desc, QuestionTitlle = model.Title, ThemeId = themeId, UserId = User.Identity.GetUserId()
            };

            await QuestionService.CreateNew(questionDto);

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