예제 #1
0
        public async Task <IEnumerable <TextFile> > GetAllTextsAsync()
        {
            try
            {
                var getText = await _textClient.GetAllTexts();

                return(getText);
            }

            catch (Exception ex)
            {
                throw;
            }
        }
예제 #2
0
        public async Task <IEnumerable <TextModel> > FindWordAsync(string word)
        {
            if (word != null)
            {
                var getText = await _textClient.GetAllTexts();

                if (getText != null)
                {
                    var selectText = getText.Where(x => x.Text.Contains(word));
                    return(selectText);
                }
            }

            return(null);
        }
예제 #3
0
        public async Task <IEnumerable <TextFile> > GetAllTextsAsync()
        {
            try
            {
                var bearerToken = Request.Headers["Authorization"];
                _logger.LogInformation($"GetAllTextsAsync {bearerToken} {DateTime.Now}");
                var getText = await _textClient.GetAllTexts();

                return(getText);
            }

            catch (Exception ex)
            {
                throw;
            }
        }