Esempio n. 1
0
        public IHttpActionResult Get()
        {
            NoteTwoService noteService = CreateNoteTwoService();
            var            notes       = noteService.GetNotes();

            return(Ok(notes));
        }
Esempio n. 2
0
        public IHttpActionResult Get(int id)
        {
            NoteTwoService noteService = CreateNoteTwoService();
            var            note        = noteService.GetNoteById(id);

            return(Ok(note));
        }
Esempio n. 3
0
        private NoteTwoService CreateNoteTwoService()
        {
            var userId      = Guid.Parse(User.Identity.GetUserId());
            var noteService = new NoteTwoService(userId);

            return(noteService);
        }