using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;


namespace DAL
{
    public class ContactRepository : RepositoryBase<Contact>
    {

        public ContactRepository(ProgrammingEFDB1Entities context)
            : base(context)
        {

        }

        public List<Contact> GetContactPaged(int page, int rows, out int totalCount)
        {

            totalCount = _dataContext.Contacts.Count();
            return _dataContext.Contacts.OrderBy(c => c.ContactID).Skip(page * rows).Take(rows).ToList();
        }

    }
}
