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")); }
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")); }