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 Catalogi findCatalogiById(int id){
        return catalogiRepository.findCatalogiById(id);
    }

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

    public Catalogi save(Catalogi catalogi){
        return catalogiRepository.save(catalogi);
    }
}
