public DataSourceHelper(string ConnectionString, DataLayerType DataLayerType, ObjectLayerType ObjectLayerType) { this._connectionString = ConnectionString; this._dataLayerType = DataLayerType; this._objectLayerType = ObjectLayerType; Initialize(); }
public DataSourceHelper(string ConnectionString, string Database, DataLayerType DataLayerType, ObjectLayerType ObjectLayerType, string[] ObjectLibrary) { this._connectionString = ConnectionString; this._database = Database; this._dataLayerType = DataLayerType; this._objectLibrary = ObjectLibrary; this._objectLayerType = ObjectLayerType; Initialize(); }
public IDataLayerBase GetDataLayer(DataLayerType tipo) { switch (tipo) { case DataLayerType.SqlServer: { return(new SqlServerDataLayer()); } default: { throw new Exception($"tipo de DataLayer no reconocido:{tipo}"); } } }
/// <summary> /// Gets a DataLayer object of the specified type. /// </summary> /// <param name="type">The type of the DataLayer.</param> /// <returns>A DataLayer.</returns> public DataLayerBase GetDataLayer(DataLayerType type) { switch (type) { case DataLayerType.SqlServer: { return(SqlServerDataLayer.Instance); } default: { throw new Exception(string.Format("Unknown DataLayer type:{0}", type)); } } }
public XpoInitializer(IDataStore DataStore, DataLayerType DataLayerType, params Type[] entityTypes) { this.entityTypes = entityTypes; this.dataLayerType = DataLayerType; this.dataStore = DataStore; dictionary = this.PrepareDictionary(entityTypes); switch (DataLayerType) { case DataLayerType.Simple: this.WorkindDal = new SimpleDataLayer(dictionary, DataStore); break; case DataLayerType.ThreadSafe: this.WorkindDal = new ThreadSafeDataLayer(dictionary, DataStore); break; } }
public XpoInitializer(string connectionString, DataLayerType DataLayerType, params Type[] entityTypes) : this(XpoDefault.GetConnectionProvider(connectionString, AutoCreateOption.DatabaseAndSchema), DataLayerType, entityTypes) { }