public IHttpActionResult Get() { NoteTwoService noteService = CreateNoteTwoService(); var notes = noteService.GetNotes(); return(Ok(notes)); }
public IHttpActionResult Get(int id) { NoteTwoService noteService = CreateNoteTwoService(); var note = noteService.GetNoteById(id); return(Ok(note)); }
private NoteTwoService CreateNoteTwoService() { var userId = Guid.Parse(User.Identity.GetUserId()); var noteService = new NoteTwoService(userId); return(noteService); }