public ActionResult Edit(Talk talk) { var talkService = new TalkService(); talkService.EditTalk(talk); //return View(talk); return RedirectToAction("Index"); }
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(); }
public ActionResult Insert(Talk newTalk) { var talkService = new TalkService(); talkService.AddTalk(newTalk); return RedirectToAction("Index"); }
public ActionResult SubmitTalk(Talk talk) { var talkService = new TalkService(); talkService.AddTalk(talk); return RedirectToAction("Index"); }