public IActionResult Get()
        {
            var query = "select * from babynames.names2010";

            var rows = _bigQuery.GetRows(query);

            var result = new List <File>();

            rows.ForEach(row => result.Add(new File
            {
                name   = row.F[ORDER_ID].V.ToString(),
                gender = row.F[ORDER_CATEGORY].V.ToString(),
                count  = Convert.ToInt32(row.F[ORDER_STATUS].V)
            }));
            return(Ok(result));
        }
Esempio n. 2
0
        public IActionResult Get()
        {
            var query = "YOUR QUERY HERE, FOLLOWING THE FIELDS ORDER DEFINED ABOVE";

            var rows = _bigQuery.GetRows(query);

            var result = new List <File>();

            rows.ForEach(row => result.Add(new File
            {
                Id       = row.F[ORDER_ID].V.ToString(),
                Category = row.F[ORDER_CATEGORY].V.ToString(),
                Status   = row.F[ORDER_STATUS].V.ToString()
            }));

            return(Ok(result));
        }