コード例 #1
0
ファイル: TalkController.cs プロジェクト: robzelt/CodeTalk
 public ActionResult Edit(Talk talk)
 {
     var talkService = new TalkService();
     talkService.EditTalk(talk);
     //return View(talk);
     return RedirectToAction("Index");
 }
コード例 #2
0
ファイル: TalkRepository.cs プロジェクト: robzelt/CodeTalk
 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
ファイル: TalkController.cs プロジェクト: robzelt/CodeTalk
 public ActionResult Insert(Talk newTalk)
 {
     var talkService = new TalkService();
     talkService.AddTalk(newTalk);
     return RedirectToAction("Index");
 }
コード例 #4
0
ファイル: HomeController.cs プロジェクト: robzelt/CodeTalk
 public ActionResult SubmitTalk(Talk talk)
 {
     var talkService = new TalkService();
     talkService.AddTalk(talk);
     return RedirectToAction("Index");
 }