public ActionResult DeletePost(int id)
 {
     var noteService = new NoteService();
     var userId = Guid.Parse(User.Identity.GetUserId());
     var result = noteService.Delete(id, userId);
     TempData.Add("Result", result ? "Note deleted." : "Note not deleted.");
     return RedirectToAction("Index");
 }
        public ActionResult DeletePost(int id)
        {
            var svc = new NoteService();
            var result = svc.Delete(id, _userId.Value);

            TempData.Add(
                "Result",
                result
                    ? "Note deleted"
                    : "Note not deleted");

            return RedirectToAction("Index");
        }