public ActionResult Ask(QuestionInputModel inputModel) { if (ModelState.IsValid) { var q = inputModel.ToQuestion(); q.CreatedBy = "users/1"; // Just a stupid default because we haven't implemented log-in return RedirectToAction("Index", "Home", new { area = "" }); } dynamic viewModel = new ExpandoObject(); viewModel.User = new UserViewModel(User) { Id = User.Identity.Name, Name = User.Identity.Name }; viewModel.Question = inputModel; return View(viewModel); }
public Question Ask(QuestionInputModel input) { return null; }