/// <inheritdoc/>
        public async Task <IEnumerable <ApplicationDto> > Handle(GetApplicationsForAuthorityQuery request, CancellationToken cancellationToken)
        {
            var query = dbContext.Applications
                        .Where(a => a.AuthorityId == request.AuthorityId)
                        .Where(a => a.Status == ApplicationStatus.Sent);

            return(await mapper.ProjectTo <ApplicationDto>(query).ToListAsync(cancellationToken));
        }
        public async Task <IEnumerable <ApplicationDto> > GetApplications(int authorityId, CancellationToken cancellationToken)
        {
            var query = new GetApplicationsForAuthorityQuery()
            {
                AuthorityId = authorityId
            };

            return(await mediator.Send(query, cancellationToken));
        }