Example #1
0
        // create a Note in service.
        public int CreateNote(Notes notes)
        {
            var result = keepNotes.GetNotesByID(notes.NoteID);

            if (result == null)
            {
                return(keepNotes.CreateNote(notes));
            }
            else
            {
                throw new NoteAlreadyExistException("The user is already Exists in database");
            }
        }
        // Implementation of Notes Methods Start From here.
        // create a Note in service.
        public void CreateNote(Notes notes)
        {
            var result = keepNotes.GetNotesByID(notes.NoteID);

            if (result == null)
            {
                if (notes.labels == null)
                {
                    notes.labels = new List <Label>();
                }
                keepNotes.CreateNote(notes);
            }
            else
            {
                throw new NoteAlreadyExistException("The user is already Exists in database");
            }
        }