Example #1
0
 public IList <T> FindAll()
 {
     using (var ctx = new ComponentEntities())
     {
         return(ctx.Set <T>().ToList());
     }
 }
Example #2
0
 public T FindById(object id)
 {
     using (var ctx = new ComponentEntities())
     {
         return(ctx.Set <T>().Find(id));
     }
 }