public ConnectionParameters(string name, EConnectionDriverTypes connectionDriverType, string host, string port, string database, string user, string password) { Name = name; ConnectionDriverType = connectionDriverType; Host = host; Port = port; Database = database; User = user; Password = password; }
public static Connection GetConnection(EConnectionDriverTypes type) { { Initialize(); var connection = LocateConnection(type); if (connection != null) { return(connection); } var parameters = _connectionsParametersFile.GetConnectionParameters(type); connection = GetNewConnection(parameters); return(connection); } }
private ConnectionParameters LocateConnectionParameters(EConnectionDriverTypes type) { return(Connections.Connections.FirstOrDefault(parameters => parameters.ConnectionDriverType == type)); }
internal ConnectionParameters GetConnectionParameters(EConnectionDriverTypes type) { return(Connections.Connections.Count == 0 ? null : LocateConnectionParameters(type)); }
public CommandFactory(ModelEntity model, EConnectionDriverTypes eConnectionDriver) { _modelEntity = model; _eConnectionDriver = eConnectionDriver; }
private static Connection LocateConnection(EConnectionDriverTypes type) { return(_connections.Values.FirstOrDefault(connection => connection.Parameters.ConnectionDriverType == type)); }