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

namespace ConstructorApp.BusinessLayer.Concrete
{
    public class ContactUsManager : IContactUsService
    {
        private readonly IContactUsDal _contactUsDal;

        public ContactUsManager(IContactUsDal contactUsDal)
        {
            _contactUsDal = contactUsDal;
        }

        public void TAdd(ContactUs entity)
        {
            _contactUsDal.Add(entity);
        }

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

        public int TCountByStatusPending()
        {
            return _contactUsDal.CountByStatusPending();
        }

        public void TDelete(ContactUs entity)
        {
            _contactUsDal.Delete(entity);
        }

        public ContactUs TGetByID(int id)
        {
            return _contactUsDal.GetByID(id);
        }

        public List<ContactUs> TGetListAll()
        {
           return _contactUsDal.GetListAll();
        }

        public void TMarkAsRead(int id)
        {
            _contactUsDal.MarkAsRead(id);
        }

        public void TUpdate(ContactUs entity)
        {
           _contactUsDal.Update(entity);
        }
    }
}
