Exemplo n.º 1
0
        public IActionResult Type()
        {
            var si = new SqlIntegrate();
            var dt = si.Adapter(
                "SELECT DISTINCT [type] FROM [Restaurant] WHERE [type] IS NOT NULL ORDER BY [type]"
                );
            var result = new JArray();

            foreach (DataRow row in dt.Rows)
            {
                result.Add(row["type"].ToString());
            }
            return(new ObjectResult(result));
        }