public NoteRepository(
            INoteQuery noteQuery,
            IAddNoteCommand addNoteCommand,
            IAddTagsCommand addTagsCommand,
            IDeleteNotesCommand deleteNotesCommand,
            IUpdateNoteCommand updateNoteCommand,
            UserManager <AppUser> userManager)
        {
            _noteQuery = noteQuery
                         ?? throw new ArgumentNullException(nameof(noteQuery));

            _addNoteCommand = addNoteCommand
                              ?? throw new ArgumentNullException(nameof(addNoteCommand));

            _addTagsCommand = addTagsCommand
                              ?? throw new ArgumentNullException(nameof(addTagsCommand));

            _deleteNotesCommand = deleteNotesCommand
                                  ?? throw new ArgumentNullException(nameof(deleteNotesCommand));

            _updateNoteCommand = updateNoteCommand
                                 ?? throw new ArgumentNullException(nameof(_updateNoteCommand));

            _userManager = userManager
                           ?? throw new ArgumentNullException(nameof(userManager));
        }
예제 #2
0
        public UpdateNoteCommand(NoteWorxDbContext context, IAddTagsCommand addTagsCommand)
        {
            _context = context
                       ?? throw new ArgumentNullException(nameof(context));

            _addTagsCommand = addTagsCommand
                              ?? throw new ArgumentNullException(nameof(addTagsCommand));
        }