Exemple #1
0
        public async Task <ActionResult <List <User> > > GetAllUsers()
        {
            var listOfUsers = _context.Set <User>().ToList();

            if (listOfUsers == null)
            {
                return(BadRequest());
            }
            return(listOfUsers);
        }
Exemple #2
0
 public async Task <ActionResult <List <Word> > > GetAllWords()
 {
     return(await _context.Set <Word>().ToListAsync());
 }
 public async Task <ActionResult <List <Number> > > GetAllNumbers()
 {
     return(await _context.Set <Number>().ToListAsync());
 }
 public async Task <ActionResult <List <Person> > > GetAllPeople()
 {
     return(await _context.Set <Person>().ToListAsync());
 }