public List <Person> GetAllPerson()
 {
     using (var dbContext = new ContactInformationEntities())
     {
         return(dbContext.People.Include(x => x.PersonContacts.Select(y => y.ContactType)).ToList());
     }
 }
 public List <T> GetAll()
 {
     using (DbContext dbContext = new ContactInformationEntities())
     {
         return(dbContext.Set <T>().
                AsQueryable <T>().ToList());
     }
 }
 public void Add(T obj)
 {
     using (DbContext dbContext = new ContactInformationEntities())
     {
         dbContext.Set <T>().Add(obj);
         dbContext.SaveChanges();
     }
 }
 public void Update(T obj)
 {
     using (var dbContext = new ContactInformationEntities())
     {
         dbContext.Entry(obj).State = EntityState.Modified;
         //dbContext.Set<T>();
         dbContext.SaveChanges();
     }
 }