public async Task <ActionResult <IEnumerable <Remark> > > GetRemarks() { try { _context.remarks.Any(); } catch (PostgresException e) { throw new NpgsqlException("Błąd serwera SQL - " + e.MessageText + " (kod " + e.SqlState + ")"); } return(await _context.Set <Remark>().OrderBy(remark => remark.id).ToListAsync()); }
public async Task <ActionResult <IEnumerable <Terminus> > > GetTerminuss() { try { _context.terminus.Any(); } catch (PostgresException e) { throw new NpgsqlException("Błąd serwera SQL - " + e.MessageText + " (kod " + e.SqlState + ")"); } return(await _context.Set <Terminus>().OrderBy(terminus => terminus.id).ToListAsync()); }
public async Task <ActionResult <IEnumerable <Brigade> > > GetBrigades() { try { _context.brigades.Any(); } catch (PostgresException e) { throw new NpgsqlException("Błąd serwera SQL - " + e.MessageText + " (kod " + e.SqlState + ")"); } return(await _context.Set <Brigade>().OrderBy(brigade => brigade.id).ToListAsync()); }