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

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class ServiceManager : IServiceService
    {
        private readonly IServiceDal _serviceDal;

        public ServiceManager(IServiceDal serviceDal)
        {
            _serviceDal = serviceDal;
        }

        public void TAdd(Service entity)
        {
           _serviceDal.Add(entity);
        }

        public void TDelete(Service entity)
        {
           _serviceDal.Delete(entity);
        }

        public Service TGetByID(int id)
        {
            return _serviceDal.GetByID(id);
        }

        public List<Service> TGetListAll()
        {
            return _serviceDal.GetListAll();
        }

        public void TServiceStatusActive(int id)
        {
            _serviceDal.ServiceStatusActive(id);
        }

        public void TServiceStatusPassive(int id)
        {
            _serviceDal.ServiceStatusPassive(id);
        }

        public void TUpdate(Service entity)
        {
           _serviceDal.Update(entity);
        }
    }
}
