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