Esempio n. 1
0
        public bool Execute(IDataAccessContext context, AggregateStatement statement)
        {
            if (context is DataAggregateContext ctx)
            {
                return(this.OnExecute(ctx, statement));
            }

            throw new DataException($"Data Engine Error: The '{this.GetType().Name}' executor does not support execution of '{context.GetType().Name}' context.");
        }
Esempio n. 2
0
        public bool Execute(IDataAccessContext context, SelectStatement statement)
        {
            switch (context)
            {
            case DataSelectContext selection:
                return(this.OnExecute(selection, statement));

            case DataInsertContext insertion:
                return(this.OnExecute(insertion, statement));

            case DataUpsertContext upsertion:
                return(this.OnExecute(upsertion, statement));

            case DataIncrementContext increment:
                return(this.OnExecute(increment, statement));
            }

            throw new DataException($"Data Engine Error: The '{this.GetType().Name}' executor does not support execution of '{context.GetType().Name}' context.");
        }