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

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class ReferenceManager : IReferenceService
    {
        private readonly IReferenceDal _referenceDal;

        public ReferenceManager(IReferenceDal referenceDal)
        {
            _referenceDal = referenceDal;
        }

        public void TAdd(Reference entity)
        {
           _referenceDal.Add(entity);
        }

        public int TCountAll()
        {
            return _referenceDal.CountAll();
        }

        public void TDelete(Reference entity)
        {
            _referenceDal.Delete(entity);
        }

        public Reference TGetByID(int id)
        {
            return _referenceDal.GetByID(id);
        }

        public List<Reference> TGetListAll()
        {
            return _referenceDal.GetListAll();
        }

        public void TUpdate(Reference entity)
        {
            _referenceDal.Update(entity);
        }
    }
}
