Ejemplo n.º 1
0
        protected EntityList FetchBy(DbMigrationHistoryQueryCriteria criteria)
        {
            var q = qf.Query(this);

            q.AddConstraintIf(DbMigrationHistory.DatabaseProperty, PropertyOperator.Contains, criteria.Database);
            if (criteria.StartTime.HasValue)
            {
                q.AddConstraintIf(DbMigrationHistory.TimeIdProperty, PropertyOperator.GreaterEqual, criteria.StartTime.Value.Ticks);
            }
            if (criteria.EndTime.HasValue)
            {
                q.AddConstraintIf(DbMigrationHistory.TimeIdProperty, PropertyOperator.LessEqual, criteria.EndTime.Value.Ticks);
            }

            return(this.QueryList(q));
        }
Ejemplo n.º 2
0
        public virtual DbMigrationHistoryList GetBy(DbMigrationHistoryQueryCriteria criteria)
        {
            var q = qf.Query(this);

            q.AddConstraintIf(DbMigrationHistory.DatabaseProperty, PropertyOperator.Contains, criteria.Database);
            if (criteria.StartTime.HasValue)
            {
                q.AddConstraintIf(DbMigrationHistory.TimeIdProperty, PropertyOperator.GreaterEqual, criteria.StartTime.Value.Ticks);
            }
            if (criteria.EndTime.HasValue)
            {
                q.AddConstraintIf(DbMigrationHistory.TimeIdProperty, PropertyOperator.LessEqual, criteria.EndTime.Value.Ticks);
            }

            return((DbMigrationHistoryList)this.QueryData(q));
        }