public async Task <IEnumerable <Guid> > GetProductIds() { var result = await Task.Run(() => _tableStorageRepository.QueryAllAsync <ProductEntity>(TableReference)).ConfigureAwait(false); if (result != null) { return(result.Select(result => result.Id)); } return(new List <Guid>()); }
public async Task <IEnumerable <ProductQueryModel> > GetAllProducts() { var result = await Task.Run(() => _tableStorageRepository.QueryAllAsync <ProductEntity>(TableReference)).ConfigureAwait(false); if (result != null) { return(result.Select(r => new ProductQueryModel { Id = r.Id, IsActive = r.IsActive, Name = r.Name, Type = r.Type })); } return(new List <ProductQueryModel>()); }