//readonly SendNotificationCommandHGandler sendNotificationCommand; public DocumentController( CreateDocumentCommandHandler createCommandHandler, SearchDocumentsQuery searchDocumentsQuery, SearchCountQuery searchCountQuery, DownloadFileQuery downloadFileQuery, GetOneDocumentQuery getOneQuery, GetAllDocumentTypesQuery getDTsQuery, GetAllEntitiesQuery getEsQuery, GetAllDocumentTypesByUserQuery getDTByUserQuery, DocumentsWithoutFilePagedQuery withoutFileQuery, UpdateFileToDocumentCommandHandler updateFileCommandHandler, DeleteDocumentCommandHandler deleteDocumentCommand, SendDocumentNotificationCommandHandler sendDocmentNotificationCommandHandler //SendNotificationCommandHGandler sendNotificationCommand) { ) { _createCommandHandler = createCommandHandler; this.searchDocumentsQuery = searchDocumentsQuery; this.searchCountQuery = searchCountQuery; this.downloadFileQuery = downloadFileQuery; this.getOneQuery = getOneQuery; this.getDTsQuery = getDTsQuery; this.getEsQuery = getEsQuery; this.withoutFileQuery = withoutFileQuery; this.updateFileCommandHandler = updateFileCommandHandler; this.deleteDocumentCommand = deleteDocumentCommand; this.sendDocumentNotificationCommandHandler = sendDocmentNotificationCommandHandler; this.getDTByUserQuery = getDTByUserQuery; //this.sendNotificationCommand = sendNotificationCommand; }
public async Task <List <GetAllDocumentTypesDto> > Handle(GetAllDocumentTypesQuery request, CancellationToken cancellationToken) { List <DocumentType> documentTypes = await _context.DocumentTypes.ToListAsync(cancellationToken); var result = documentTypes.Select(documentType => documentType.ToGetAllDocumentTypesDto()).ToList(); return(result); }
public DocumentTypeController( CreateDocumentTypeCommandHandler createCommand, GetAllDocumentTypesQuery getAllQuery, GetDocumentTypeQuery getOneQuery, UpdateDocumentTypeCommandHandler updateCommand, DeleteDocumentTypeCommandHandler deleteCommand) { this.createCommand = createCommand; this.getAllQuery = getAllQuery; this.getOneQuery = getOneQuery; this.updateCommand = updateCommand; this.deleteCommand = deleteCommand; }
public AnnotationController( CreateAnnotationCommandHandler createCommand, DeleteAnnotationCommandHandler deleteCommand, GetDocumentAnnotationsQuery documentAnnotationsQuery, GetAllDocumentTypesQuery getDTsQuery, GetAllEntitiesQuery getEsQuery, GetAllAnnotationTypesQuery getAATsQuery, SearchDocumentsToAnnotateCountQuery searchCountQuery, SearchDocumentsToAnnotateQuery searchQuery ) { this.createCommand = createCommand; this.deleteCommand = deleteCommand; this.documentAnnotationsQuery = documentAnnotationsQuery; this.getDTsQuery = getDTsQuery; this.getEsQuery = getEsQuery; this.getAATsQuery = getAATsQuery; this.searchCountQuery = searchCountQuery; this.searchQuery = searchQuery; }
public SearchController( GetAllDocumentTypesQuery getAllDTQuery, GetAllEntitiesQuery getAllETQuery, SearchCountQuery searchCountQuery, SearchDocumentsQuery searchDocumentsQuery, DownloadFileQuery downloadFileQuery, GetAllAnnotationTypesQuery getAllATQuery, GetDocumentAnnotationsQuery getDocAnnotationsQuery, GetOneDocumentQuery getOneDocumentQuery ) { this.getAllDTQuery = getAllDTQuery; this.getAllEQuery = getAllETQuery; this.searchCountQuery = searchCountQuery; this.searchDocumentsQuery = searchDocumentsQuery; this.downloadFileQuery = downloadFileQuery; this.getAllATQuery = getAllATQuery; this.getDocAnnotationsQuery = getDocAnnotationsQuery; this.getOneDocumentQuery = getOneDocumentQuery; }
public async Task <BasicApiResponse <IEnumerable <ReadDocumentTypeListResponse> > > Handle(GetAllDocumentTypesQuery request, CancellationToken cancellationToken) { IReadOnlyList <DocumentType> types = await _repository.GetAllAsync(); IEnumerable <ReadDocumentTypeListResponse> dto = _mapper.Map <IEnumerable <ReadDocumentTypeListResponse> >(types); return(new BasicApiResponse <IEnumerable <ReadDocumentTypeListResponse> >(dto)); }