public async Task <ActionResult <IEnumerable <Favorite> > > GetFavoriteByCustomer(string customerId) { try { var Favorite = await _repository.GetFavoriteByCustomer(customerId); return(Ok(Favorite)); } catch (Exception exc) { _logger.LogError($"Error: {exc}"); // transaction.Rollback(); return(NotFound()); } }