using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class HomeBannerManager : IHomeBannerService
    {
        private readonly IHomeBannerDal _homeBannerDal;

        public HomeBannerManager(IHomeBannerDal homeBannerDal)
        {
            _homeBannerDal = homeBannerDal;
        }

        public void TAdd(HomeBanner entity)
        {
            _homeBannerDal.Add(entity);
        }

        public void TDelete(HomeBanner entity)
        {
            _homeBannerDal.Delete(entity);
        }

        public HomeBanner TGetByID(int id)
        {
            return _homeBannerDal.GetByID(id);
        }

        public List<HomeBanner> TGetListAll()
        {
           return _homeBannerDal.GetListAll();
        }

        public void TUpdate(HomeBanner entity)
        {
           _homeBannerDal.Update(entity);
        }
    }
}
