Пример #1
0
        ///<summary
        /// Gets all the notes for the current user.
        /// </summary>
        /// <returns></returns>


        public IHttpActionResult GetNotes()
        {
            var service = new Services.NoteService();
            var userId  = User.Identity.GetUserId();
            var notes   = service.GetAllForUser(Guid.Parse(userId));

            return(Ok(notes));
        }
Пример #2
0
        ///<summary
        /// Gets all the notes for the current user.
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult GetNotes()
        {
            var service = new Services.NoteService();
            var userId = User.Identity.GetUserId();
            var notes = service.GetAllForUser(Guid.Parse(userId));

            return Ok(notes);
        }
Пример #3
0
        // GET: Notes
        public ActionResult Index()
        {
            if (TempData["Result"] != null)
            {
                ViewBag.Success = TempData["Result"];
                TempData.Remove("Result");
            }

            var noteService = new Services.NoteService();
            var notes       = noteService.GetAllForUser(Guid.Parse(User.Identity.GetUserId()));

            return(View(notes));
        }
Пример #4
0
        // GET: Notes
        public ActionResult Index()
        {
            if (TempData["Result"] != null)
            {
                ViewBag.Success = TempData["Result"];
                TempData.Remove("Result");
            }

            var noteService = new Services.NoteService();
            var notes = noteService.GetAllForUser(Guid.Parse(User.Identity.GetUserId()));
            return View(notes);
        }