コード例 #1
0
        public void ExecQuery()
        {
            var c = new IndexController {
                Session = session,
                Cfg     = NHWebConsoleSetup.Configuration(),
                RawUrl  = "/pepe.aspx",
            };
            var model = new Context {
                Query       = "from System.Object",
                QueryType   = QueryType.HQL,
                ImageFields = new string[0],
            };

            c.ExecQuery(model);
            Assert.IsNotNull(model.Results);
            Assert.Greater(model.Results.Count, 0);
            foreach (var r in model.Results)
            {
                foreach (var m in r)
                {
                    Console.WriteLine("{0}: {1}", m.Key, m.Value);
                }
            }
        }