using System.Data.Entity;
using System.Linq;
using EF.ModelFirst.DAL.Contracts;
using EF.ModelFirst.DomainClasses;
using  Core.Common;


namespace EF.ModelFirst.DAL
{
    public class CompanyRepository : GenericRepository<Company>, ICompanySpecificRepository
    {
        public CompanyRepository(DbContext context) : base(context)
        {
        }

        public Company GetByName(string name)
        {
            return (FindBy(company => company.Name == name).FirstOrDefault());
        }
    }
}
