Exemple #1
0
        public SoodaDataSource OpenDataSource(Sooda.Schema.DataSourceInfo dataSourceInfo, IDbConnection connection)
        {
            foreach (SoodaDataSource dataSource in _dataSources)
            {
                if (dataSource.Name == dataSourceInfo.Name)
                {
                    return(dataSource);
                }
            }

            SoodaDataSource ds = (SoodaDataSource)dataSourceInfo.CreateDataSource();

            _dataSources.Add(ds);
            ds.Statistics     = this.Statistics;
            ds.IsolationLevel = IsolationLevel;
            if (connection != null)
            {
                ds.Connection = connection;
            }
            else
            {
                ds.Open();
            }
            if (_savingObjects)
            {
                ds.BeginSaveChanges();
            }
            return(ds);
        }
 public void RegisterDataSource(SoodaDataSource dataSource)
 {
     dataSource.Statistics = this.Statistics;
     dataSource.IsolationLevel = IsolationLevel;
     _dataSources.Add(dataSource);
 }
Exemple #3
0
 public void RegisterDataSource(SoodaDataSource dataSource)
 {
     dataSource.Statistics     = this.Statistics;
     dataSource.IsolationLevel = IsolationLevel;
     _dataSources.Add(dataSource);
 }