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

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class CompanyInfoManager : ICompanyInfoService
    {
        private readonly ICompanyInfoDal _companyInfoDal;

        public CompanyInfoManager(ICompanyInfoDal companyInfoDal)
        {
            _companyInfoDal = companyInfoDal;
        }

        public void TAdd(CompanyInfo entity)
        {
           _companyInfoDal.Add(entity);
        }

        public void TDelete(CompanyInfo entity)
        {
           _companyInfoDal.Delete(entity);
        }

        public CompanyInfo TGetByID(int id)
        {
            return _companyInfoDal.GetByID(id);
        }

        public List<CompanyInfo> TGetListAll()
        {
            return _companyInfoDal.GetListAll();
        }

        public void TUpdate(CompanyInfo entity)
        {
            _companyInfoDal.Update(entity);
        }
    }
}
