Example #1
0
        private void InitializeDataLayer()
        {
            XPDictionary dict = new ReflectionDictionary();

            dict.GetDataStoreSchema(this.Assesmblies);

            this._IDbConnection = new SqlConnection(this._connectionString);
            this._dataStore     = MSSqlConnectionProvider.CreateProviderFromConnection(this._IDbConnection, AutoCreateOption.DatabaseAndSchema);

            if (this._dataLayerType == DataLayerType.SimpleDataLayer)
            {
                this._dataLayer = new SimpleDataLayer(dict, this._dataStore);
            }
            else
            {
                this._dataLayer = new ThreadSafeDataLayer(dict, this._dataStore);
            }
        }