using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;

namespace Service.Implement
{
	public class RoomTypeAirManager : GenericManagerBase<RoomTypeAir>, IRoomTypeAirManager
	{
		public IList<RoomTypeAir> LoadAll(RoomType roomType)
		{
			return CurrentRepository.LoadAll().Where(r => r.RoomType == roomType).ToList();
		}

        public RoomTypeAir Load(RoomType roomType, ModalType modalType)
        {
            return CurrentRepository.LoadAll().OrderBy(r => r.Sort).FirstOrDefault(r => r.RoomType == roomType && r.ModalType == modalType);
        }
	}
}
