private void Construct() { this.SchemaName = typeof(TEntity).GetAttributeValue((SchemaNameAttribute attr) => attr.SchemaName); this.TableName = typeof(TEntity).GetAttributeValue((TableNameAttribute attr) => attr.TableName); this.PrimaryKey = typeof(TEntity).GetAttributeValue((PrimaryKeyAttribute attr) => attr.ColumnName); if (this.DatabaseOptions == null) { var databaseOptions = typeof(TEntity).GetAttributeValue((PocoDatabaseOptionsAttribute pdo) => pdo.DatabaseOptions); if (databaseOptions != null) { this.DatabaseOptions = databaseOptions; } } if (this.DatabaseOptions == null) { if (PocoStatic.DefaultOptions != null) { this.DatabaseOptions = PocoStatic.DefaultOptions; } } }
public PocoDatabaseOptionsAttribute(DatabaseEngine databaseEngine, string connectionString) { this.DatabaseOptions = new PocoDatabaseOptions(databaseEngine, connectionString); }
public PocoDatabaseOptionsAttribute(PocoDatabaseOptions databaseOptions) { this.DatabaseOptions = databaseOptions; }
public static void SetDefaultOptions(DatabaseEngine databaseEngine, string connectionString) { DefaultOptions = new PocoDatabaseOptions(databaseEngine, connectionString); }
public static void SetDefaultOptions(PocoDatabaseOptions databaseOptions) { DefaultOptions = databaseOptions; }