public ActionResult <IEnumerable <Team> > Get() { var Teams = db.Set <Team>().OrderBy(p => p.Id).Take(10).ToList(); return(Ok(Teams)); }
public ActionResult <IEnumerable <Person> > Get() { var people = db.Set <Person>().Include(p => p.Team).OrderBy(p => p.Id).Take(10).ToList(); return(Ok(people)); }
public virtual async Task <T> GetByIdAsync(long id) { return(await _dbContext.Set <T>().FindAsync(id)); }