public async Task <IActionResult> Create([FromServices] DalStoryEvent dalStoryEvent, int idStoryEvent) { ViewBag.EventForChoice = await dalStoryEvent.GetById(idStoryEvent); ViewBag.ListOfEvents = await dalStoryEvent.GetAll(); return(View()); }
public async Task <IActionResult> Delete([FromServices] DalStoryEvent dalStoryEvent, int id, int idStoryEvent) { var question = await _dalQuestion.GetById(id); if (question == null) { return(NotFound()); } ViewBag.EventOfQuestion = await dalStoryEvent.GetById(idStoryEvent); return(View(question)); }
public async Task <IActionResult> Edit([FromServices] DalStoryEvent dalStoryEvent, int idQuestion, int idStoryEvent) { Question questionToEdit = await this._dalQuestion.GetById(idQuestion); if (questionToEdit == null) { return(NotFound()); } ViewBag.EventForQuestion = await dalStoryEvent.GetById(idStoryEvent); return(View(questionToEdit)); }
// GET: Choices/Delete/5 public async Task <IActionResult> Delete([FromServices] DalStoryEvent dalStoryEvent, int id, int idStoryEvent) { var choice = await _dalChoice.GetById(id); if (choice == null) { return(NotFound()); } ViewBag.EventOfChoice = await dalStoryEvent.GetById(idStoryEvent); return(View(choice)); }
public async Task <IActionResult> Edit([FromServices] DalStoryEvent dalStoryEvent, int idChoice, int idStoryEvent) { Choice choiceToEdit = await this._dalChoice.GetById(idChoice); ViewBag.EventForChoice = await dalStoryEvent.GetById(idStoryEvent); ViewBag.ListOfEvents = await dalStoryEvent.GetAll(); if (choiceToEdit == null) { return(NotFound()); } return(View(choiceToEdit)); }
public async Task <IActionResult> Create([FromServices] DalStoryEvent dalStoryEvent, int idStoryEvent) { ViewBag.EventForQuestion = await dalStoryEvent.GetById(idStoryEvent); return(View()); }
public StoryEventController(DalStoryEvent context) { this._dalStoryEvent = context; }