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

namespace Dao.Implement
{
	public class HostUpdateStatusRepository : RepositoryBase<HostUpdateStatus>, IHostUpdateStatusRepository
	{

        public HostUpdateStatus Get(Host host, int status)
		{
			return LoadAll().FirstOrDefault(r => r.Host == host && r.Status == status);
		}

        public HostUpdateStatus Get(Host host, HostUpdate hostUpdate)
		{
			return LoadAll().FirstOrDefault(r => r.Host == host && r.HostUpdate == hostUpdate);
		}

        public HostUpdateStatus Get(Host host, HostUpdate hostUpdate, int status)
        {
            return LoadAll().FirstOrDefault(r => r.Host == host && r.HostUpdate == hostUpdate && r.Status == status);
        }
	}
}
