Ejemplo n.º 1
0
        public static long Count(WhereDelegate <DaoReferenceObjectColumns> where, Database db = null)
        {
            DaoReferenceObjectColumns c = new DaoReferenceObjectColumns();
            IQueryFilter filter         = where (c);
            QuerySet     query          = new QuerySet();

            query.Count <DaoReferenceObject>();
            query.Where(filter);

            if (db == null)
            {
                db = Db.For <DaoReferenceObject>();
            }
            query.Execute(db);
            return(query.Results.As <CountResult>(0).Value);
        }
Ejemplo n.º 2
0
        public static DaoReferenceObjectCollection Top(int count, WhereDelegate <DaoReferenceObjectColumns> where, Database db = null)
        {
            DaoReferenceObjectColumns c = new DaoReferenceObjectColumns();
            IQueryFilter filter         = where (c);
            QuerySet     query          = new QuerySet();

            query.Top <DaoReferenceObject>(count);
            query.Where(filter);

            if (db == null)
            {
                db = Db.For <DaoReferenceObject>();
            }

            query.Execute(db);
            return(query.Results.As <DaoReferenceObjectCollection>(0));
        }
Ejemplo n.º 3
0
        public override IQueryFilter GetUniqueFilter()
        {
            var colFilter = new DaoReferenceObjectColumns();

            return(colFilter.Id == IdValue);
        }