Exemple #1
0
        private DbQuery <T> Union(DbSet <T> dbSet, DbUnionKind kind)
        {
            dbSet.VerifyNotNull(nameof(dbSet));

            var model           = _.MakeCopy(false);
            var queryStatement1 = this.GetSimpleQueryStatement();
            var queryStatement2 = dbSet.GetSimpleQueryStatement();

            return(new DbQuery <T>(model, DbSession, new DbUnionStatement(model, queryStatement1, queryStatement2, kind)));
        }
        internal DbUnionStatement(Model model, DbQueryStatement query1, DbQueryStatement query2, DbUnionKind kind)
            : base(model)
        {
            Debug.Assert(query1 != null);
            Debug.Assert(query2 != null);

            Query1 = query1;
            Query2 = query2;
            Kind   = kind;
        }