コード例 #1
0
        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());
        }
コード例 #2
0
        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());
        }
コード例 #3
0
        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());
        }