public ActionResult Add(CreateNewNote command) { var service = new MyNotesCommandServiceClient(); service.CreateNewNote(command); // Return user back to the index that // displays all the notes.)); return RedirectToAction("Index"); }
public ActionResult Edit(ChangeNoteText command) { var service = new MyNotesCommandServiceClient(); service.ChangeNoteText(command); // Return user back to the index that // displays all the notes.)); return RedirectToAction("Index"); }
public ActionResult Add(CreateNewNote command) { var service = new MyNotesCommandServiceClient(); service.CreateNewNote(command); // Return user back to the index that // displays all the notes.)); return(RedirectToAction("Index")); }
public ActionResult Edit(ChangeNoteText command) { var service = new MyNotesCommandServiceClient(); service.ChangeNoteText(command); // Return user back to the index that // displays all the notes.)); return(RedirectToAction("Index")); }
public ActionResult Add(CreateNewNote command) { Guid summaryId; using (var context = new ReadModelContainer()) { var query = from item in context.TotalsPerDayItemSet where item.Date == System.DateTime.Now.Date orderby item.Date descending select item.SummaryId; Guid.TryParse(query.ToString(), out summaryId); } command.SummaryId = summaryId; var service = new MyNotesCommandServiceClient(); service.CreateNewNote(command); // Return user back to the index that // displays all the notes.)); return(RedirectToAction("Index")); }