Пример #1
0
        public void ExecutingQuery([SelectionList("Expressions")]string Query, out ResultSet Results)
        {
            var queryable = _queries[Query](_session.Query<Target>()).As<MartenQueryable<Target>>();
            var sql = _container.GetInstance<MartenQueryExecutor>().BuildCommand(queryable).CommandText;
            Debug.WriteLine(sql);

            Results = new ResultSet(queryable.ToArray().Select(x => _idToName[x.Id]).ToArray());
        }
Пример #2
0
        public void ExecutingQuery([SelectionList("Expressions")]string Query, out ResultSet Results)
        {
            var queryable = _queries[Query](_session.Query<Target>()).As<MartenQueryable<Target>>();
            var sql = queryable.ToCommand(FetchType.FetchMany).CommandText;
            Debug.WriteLine(sql);

            Results = new ResultSet(queryable.ToArray().Select(x => _idToName[x.Id]).ToArray());
        }
Пример #3
0
        public void ExecutingQuery([SelectionList("Expressions")]string WhereClause, out ResultSet Results)
        {
            var expression = _wheres[WhereClause];
            var queryable = _session.Query<Target>().Where(expression);
            var sql = _container.GetInstance<MartenQueryExecutor>().BuildCommand<Target>(queryable).CommandText;
            Debug.WriteLine(sql);

            Results = new ResultSet(queryable.ToArray().Select(x => _idToName[x.Id]).ToArray());
        }
Пример #4
0
        public void ExecutingQuery([SelectionList("Expressions"), Header("Where Clause")]string WhereClause, out ResultSet Results)
        {
            var expression = _wheres[WhereClause];
            var queryable = _session.Query<Target>().Where(expression);
            var sql = queryable.ToCommand(FetchType.FetchMany).CommandText;
            Debug.WriteLine(sql);

            Results = new ResultSet(queryable.ToArray().Select(x => _idToName[x.Id]).ToArray());
        }
Пример #5
0
 protected bool Equals(ResultSet other)
 {
     return _names.SequenceEqual(other._names);
 }
Пример #6
0
 protected bool Equals(ResultSet other)
 {
     return(_names.SequenceEqual(other._names));
 }
Пример #7
0
        public void ExecutingQuery([SelectionList("Expressions"), Header("Where Clause")] string WhereClause, out ResultSet Results)
        {
            var expression = _wheres[WhereClause];
            var queryable  = _session.Query <Target>().Where(expression);
            var sql        = _container.GetInstance <MartenQueryExecutor>().BuildCommand <Target>(queryable).CommandText;

            Debug.WriteLine(sql);

            Results = new ResultSet(queryable.ToArray().Select(x => _idToName[x.Id]).ToArray());
        }