public void GetAll_Should_Call_UnitOfWork_And_Repository()
        {
            // Act
            _ = _productsProvider.GetAll();

            // Assert
            _unitOfWorkMock.Verify(x => x.Repository <ProductEntity>(), Times.Once());
            _repositoryMock.Verify(x => x.GetAsNoTracking(), Times.Once());
        }
        public ActionResult <IEnumerable <Product> > Get()
        {
            try
            {
                return(_provider.GetAll());
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception during providing products, maybe DB is not fully initialized yet? " +
                                  $"Try again in a few minutes and if it doesn't help, check your docker-compose configuration.\n{e}");

                return(new Product[0]);
            }
        }
 public ActionResult <IEnumerable <Product> > Get()
 {
     Console.WriteLine("foi?");
     return(_provider.GetAll());
 }