public async Task GetAllAsync_Not_Null_Not_Empty()
        {
            var glasses = await _glassRepository.GetAllAsync();

            Assert.NotNull(glasses);
            Assert.True(glasses.Any());
        }
예제 #2
0
        public async Task <IEnumerable <GlassDto> > GetAllAsync()
        {
            var glassDtos = await _glassElasticsearch.GetAllAsync();

            if (glassDtos.Any())
            {
                return(glassDtos);
            }
            var glasss = await _glassRepository.GetAllAsync();

            return(AutoMapper.Mapper.Map <IEnumerable <Glass>, IEnumerable <GlassDto> >(glasss));
        }