Esempio n. 1
0
 public IEnumerable <FileInfo> Get()
 {
     try
     {
         return(_repo.GetImagesInfo());
     }
     catch (Exception e)
     {
         _logger.Error(e);
         throw;
     }
 }
Esempio n. 2
0
        public IEnumerable <FileInfo> GetProductImages(Guid idProduct)
        {
            var ids = _commonDb.Query <Guid>("select idImage from ProductImages where idProduct = @idProduct", new { idProduct }).ToArray();

            if (ids.Length == 0)
            {
                return new FileInfo[] { }
            }
            ;

            return(_imageRepo.GetImagesInfo(ids));
        }
    }