Esempio n. 1
0
            public async Task <IList <DataProfileDto> > Handle(Query request, CancellationToken cancellationToken)
            {
                if (string.IsNullOrEmpty(request.ProfileName))
                {
                    return(null);
                }

                var profile = await _docufloSdkService.GetProfileSearch(new ProfileSearchRequestBody
                {
                    profile_name    = request.ProfileName,
                    column_names    = request.ColumnNames.ToArrayOfAnyType(),
                    column_keywords = request.ColumnKeywords.ToArrayOfAnyType(),
                    error_msg       = request.ErrorMsg
                });

                var dataProfiles = profile.AsQueryable().GetSearchQuery(request.Query, request.Page, request.Limit, request.Order);

                IList <DataProfileDto> dataProfilesAsDto = dataProfiles.Select(data => _dtoHelper.PrepareDataProfileDto(data)).ToList();

                return(dataProfilesAsDto);
            }
Esempio n. 2
0
            public async Task <IList <DataProfileDto> > Handle(Query request, CancellationToken cancellationToken)
            {
                var profile = await _docufloSdkService.GetSearch(new SearchRequestBody
                {
                    strCriteria = request.Criteria
                });

                var dataProfiles = profile.AsQueryable().GetSearchQuery(request.Query, request.Page, request.Limit, request.Order);

                IList <DataProfileDto> dataProfilesAsDto = dataProfiles.Select(data => _dtoHelper.PrepareDataProfileDto(data)).ToList();

                return(dataProfilesAsDto);
            }
Esempio n. 3
0
            public async Task <IList <DataProfileDto> > Handle(Query request, CancellationToken cancellationToken)
            {
                if (request.ProfileId <= 0)
                {
                    return(null);
                }

                var profile = await _docufloSdkService.GetSearchByDocId(new SearchByDocIDRequestBody
                {
                    profileID = request.ProfileId,
                    docID     = request.DocId
                });

                var dataProfiles = profile.AsQueryable().GetSearchQuery(request.Query, request.Page, request.Limit, request.Order);

                IList <DataProfileDto> dataProfilesAsDto = dataProfiles.Select(data => _dtoHelper.PrepareDataProfileDto(data)).ToList();

                return(dataProfilesAsDto);
            }