예제 #1
0
 public ActionResult Edit(Talk talk)
 {
     var talkService = new TalkService();
     talkService.EditTalk(talk);
     //return View(talk);
     return RedirectToAction("Index");
 }
예제 #2
0
 public void EditTalk(Talk talk)
 {
     Talk serverTalk = codeTalkContext.Talks.FirstOrDefault(t => t.Id == talk.Id);
     serverTalk.Title = talk.Title;
     serverTalk.Description = talk.Description;
     serverTalk.DateCreated = talk.DateCreated;
     serverTalk.DateModified = DateTime.Now;
     codeTalkContext.SaveChanges();
 }
예제 #3
0
 public ActionResult Insert(Talk newTalk)
 {
     var talkService = new TalkService();
     talkService.AddTalk(newTalk);
     return RedirectToAction("Index");
 }
예제 #4
0
 public ActionResult SubmitTalk(Talk talk)
 {
     var talkService = new TalkService();
     talkService.AddTalk(talk);
     return RedirectToAction("Index");
 }