public IList <T> GetList() { using (var context = new ToDoListDbContext()) { return(context.Set <T>().ToList()); } }
public T GetById(int id) { using (var context = new ToDoListDbContext()) { return(context.Set <T>().Find(id)); } }