package com.itsol.quantrivanphong.access.homepage.business;

import com.itsol.quantrivanphong.access.homepage.repository.CatalogiRepository;
import com.itsol.quantrivanphong.model.Catalogi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class CatalogiBusiness {
    @Autowired
    private CatalogiRepository catalogiRepository;

    public Optional<Catalogi> findById(int id){
        return catalogiRepository.findById(id);
    }

    public List<Catalogi> findAllCatalogi(){
        return catalogiRepository.findAllCatalogi();
    }

}
