using System.Linq;
using Rainbow.Models;

namespace Rainbow.Data
{
    public class ProjectsRepository : GenericRepository<Project>, IProjectsRepository
    {
        public ProjectsRepository(RainbowContext context)
            : base(context)
        {            
        }

        public Project GetByName(string name)
        {
            return Context.Projects.SingleOrDefault(d => d.Name == name);
        }
    }
}
