using System.Linq;
using Rainbow.Models;

namespace Rainbow.Data
{
    public class DomainsRepository : GenericRepository<Domain>, IDomainsRepository
    {
        public DomainsRepository(RainbowContext context) : base(context)
        {            
        }

        public Domain GetByName(string name)
        {
            return Context.Domains.SingleOrDefault(d => d.Name == name);


        }
    }
}
