public ActionResult EditGet(int Id) { var noteService = new NoteService(); var userId = Guid.Parse(User.Identity.GetUserId()); var note = (noteService.GetById(Id, userId)); return View(note); }
public ActionResult DetailsGet(int id) { var noteService = new NoteService(); var userId = Guid.Parse(User.Identity.GetUserId()); var note = noteService.GetById(id, userId); return View(note); }
public ActionResult Details(int Id) { var noteService = new NoteService(); var userId = Guid.Parse(User.Identity.GetUserId()); var result = noteService.GetById(Id, userId); return View(result); }
public ActionResult DeleteGet(int id) { var svc = new NoteService(); var note = svc.GetById(id, _userId.Value); return View(note); }
// PUT api/<controller>/5 public IHttpActionResult Put(int id) { var svc = new NoteService(); var note = svc.GetById(id, _userId.Value); note.IsFavorite = true; var result = svc.Update(note, _userId.Value); return Ok(result); }