public Note CreateNote(Note note)
 {
     Note result = null;
     using (NoteManager manager = new NoteManager())
     {
         result = manager.Create(note);
     }
     return result;
 }
 public bool DeleteNote(int userId, Note note)
 {
     bool result = false;
     using (NoteManager manager = new NoteManager())
     {
         if (manager.ValidateNoteOwner(userId, note.Id))
             result = manager.Delete(note.Id);
     }
     return result;
 }
 public Note UpdateNote(int userId, Note note)
 {
     Note result = null;
     using (NoteManager manager = new NoteManager())
     {
         if (manager.ValidateNoteOwner(userId, note.Id))
             result = manager.Update(note);
     }
     return result;
 }