Reputation: 249
I have 2 separate databases which I'm wanting to merge to be shared by one site. When someone logs in I have a check to see if the user exists in database one, if they aren't I check database 2, if they are in that database I want to switch to default connection string to database 2. The petapoco database is has auto-generated code it says not to change. so is this possible?
Upvotes: 1
Views: 3580
Reputation: 39443
The PetaPoco Database object has 4 constructors:
public Database(IDbConnection connection)
public Database(string connectionString, string providerName)
public Database(string connectionString, DbProviderFactory provider)
public Database(string connectionStringName)
Use Database(string connectionString, string providerName)
if you want to provide the connection string.
Upvotes: 1