Пример #1
0
        public override ISelectStatement <TEntity> CountAll()
        {
            var columns = Specification.Columns;
            var columnSpecification1 = new ColumnSpecification
            {
                Identifier = "*", Aggregation = Aggregation.Count, EntityType = typeof(TEntity)
            };
            var columnSpecification2 = columnSpecification1;

            columns.Add(columnSpecification2);
            return(this);
        }
Пример #2
0
        protected override void AddJoinsColumnSelection <T>(string name, string alias = null)
        {
            var joinsColumns         = Specification.JoinsColumns;
            var columnSpecification1 = new ColumnSpecification();

            columnSpecification1.Aggregation = Aggregation.None;
            columnSpecification1.Alias       = alias;
            columnSpecification1.EntityType  = typeof(T);
            columnSpecification1.Identifier  = name;
            columnSpecification1.ColumnName  = GetColumnAlias <TEntity>(name);
            var columnSpecification2 = columnSpecification1;

            joinsColumns.Add(columnSpecification2);
        }
Пример #3
0
        protected override void AddColumnSelection <T>(
            string name,
            string showname         = "",
            string alias            = null,
            Aggregation aggregation = Aggregation.None)
        {
            var columns = Specification.Columns;
            var columnSpecification1 = new ColumnSpecification
            {
                Aggregation           = aggregation,
                Alias                 = alias,
                EntityType            = typeof(T),
                Identifier            = name,
                ColumnName            = GetColumnAlias <TEntity>(name),
                AggregationColumnName = showname == "" ? name : showname
            };
            var columnSpecification2 = columnSpecification1;

            columns.Add(columnSpecification2);
        }