using System;
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 CustomerRepository :GenericRepository<Customer>,ICustomerSpecificRepository
    {
        // implement here specific ICustomerSpecificRepository

        public CustomerRepository(DbContext context) : base(context)
        {
            
        }

        public Customer GetByName(string name)
        {
            return (FindBy(customer => customer.LastName == name).FirstOrDefault());
        }
    }
}
