using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
using Dao;
using RCUHost;
using RCUHost.Protocols;

namespace Service.Implement
{
    public class HostSceneManager : GenericManagerBase<HostScene>, IHostSceneManager
    {
        public HostScene Get(int hostID, int roomTypeSceneId)
        {
            return CurrentRepository.LoadAll().FirstOrDefault(r => r.HostID == hostID && r.Scene != null && r.Scene.ID == roomTypeSceneId);
        }

        public IList<HostScene> LoadByHostID(int hostID)
        {
            return ((IHostSceneRepository)CurrentRepository).LoadByHostID(hostID).ToList();
        }

        public void DeteleByHostID(int hostID)
        {
            ((IHostSceneRepository)CurrentRepository).DeteleByHostID(hostID);
        }

        public void DeteleByRoomTypeScene(int roomTypeSceneID)
        {
            ((IHostSceneRepository)CurrentRepository).DeteleByRoomTypeScene(roomTypeSceneID);
        }

        public void DeteleByRoomTypeScene(int hostID, int roomTypeSceneID)
        {
            ((IHostSceneRepository)CurrentRepository).DeteleByRoomTypeScene(hostID, roomTypeSceneID);
        }
    }
}
