Esempio n. 1
0
        public DataExecuteContext(IDataAccess dataAccess, string name, bool isScalar, Type resultType, IDictionary <string, object> inParameters, IDictionary <string, object> outParameters, object state = null) : base(dataAccess, name, isScalar, resultType, inParameters, outParameters, state)
        {
            _provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);

            if (!_provider.Metadata.Commands.TryGet(name, out _command))
            {
                throw new DataException($"The specified '{name}' command mapping does not exist.");
            }

            this.Session = DataAccessContextUtility.GetSession(() => _provider.Multiplexer.GetSource(this));
        }
Esempio n. 2
0
 public DataCountContext(IDataAccess dataAccess, string name, ICondition condition, string member, object state = null) : base(dataAccess, name, condition, member, state)
 {
     DataAccessContextUtility.Initialize(dataAccess.Name, name, out _provider, out _entity);
     this.Session = DataAccessContextUtility.GetSession(() => _provider.Multiplexer.GetSource(this));
 }
Esempio n. 3
0
 public DataSelectContext(IDataAccess dataAccess, string name, Type entityType, Grouping grouping, ICondition condition, ISchema schema, Paging paging, Sorting[] sortings, object state = null) : base(dataAccess, name, entityType, grouping, condition, schema, paging, sortings, state)
 {
     DataAccessContextUtility.Initialize(dataAccess.Name, name, out _provider, out _entity);
     this.Session = DataAccessContextUtility.GetSession(() => _provider.Multiplexer.GetSource(this));
 }
Esempio n. 4
0
 public DataUpsertContext(IDataAccess dataAccess, string name, bool isMultiple, object data, ISchema schema, object state = null) : base(dataAccess, name, isMultiple, data, schema, state)
 {
     DataAccessContextUtility.Initialize(dataAccess.Name, name, out _provider, out _entity);
     this.Session = DataAccessContextUtility.GetSession(() => _provider.Multiplexer.GetSource(this));
 }
Esempio n. 5
0
 public DataExistContext(IDataAccess dataAccess, string name, ICondition criteria, IDataExistsOptions options = null) : base(dataAccess, name, criteria, options)
 {
     this.Aliaser  = new Common.Expressions.Aliaser();
     this.Provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);
     this.Session  = DataAccessContextUtility.GetSession(() => this.Provider.Multiplexer.GetSource(this));
 }
Esempio n. 6
0
 public DataExistContext(IDataAccess dataAccess, string name, ICondition condition, IDictionary <string, object> states = null) : base(dataAccess, name, condition, states)
 {
     this.Provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);
     this.Session  = DataAccessContextUtility.GetSession(() => this.Provider.Multiplexer.GetSource(this));
 }
Esempio n. 7
0
 public DataExecuteContext(IDataAccess dataAccess, string name, bool isScalar, Type resultType, IDictionary <string, object> inParameters, IDictionary <string, object> outParameters, IDictionary <string, object> states = null) : base(dataAccess, name, isScalar, resultType, inParameters, outParameters, states)
 {
     this.Provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);
     this.Session  = DataAccessContextUtility.GetSession(() => this.Provider.Multiplexer.GetSource(this));
 }
Esempio n. 8
0
 public DataSelectContext(IDataAccess dataAccess, string name, Type entityType, Grouping grouping, ICondition condition, ISchema schema, Paging paging, Sorting[] sortings, IDictionary <string, object> states = null) : base(dataAccess, name, entityType, grouping, condition, schema, paging, sortings, states)
 {
     this.Provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);
     this.Session  = DataAccessContextUtility.GetSession(() => this.Provider.Multiplexer.GetSource(this));
 }
Esempio n. 9
0
 public DataUpsertContext(IDataAccess dataAccess, string name, bool isMultiple, object data, ISchema schema, IDictionary <string, object> states = null) : base(dataAccess, name, isMultiple, data, schema, states)
 {
     this.Provider = DataEnvironment.Providers.GetProvider(dataAccess.Name);
     this.Session  = DataAccessContextUtility.GetSession(() => this.Provider.Multiplexer.GetSource(this));
 }