I have the following single database structure:
Server
|
Database
+ Tables
+ Programmability(stored procedures)
In which I am using the following method to make a stored procedure call using Dapper:
public List<Events> GetEvents()
{
using (var connection = new SqlConnection(SQLSettings.GetConnectionString()))
{
return connection.Query<Events>("GetEvents", commandType: CommandType.StoredProcedure).ToList();
}
}
But now I'm changing the back end to a multiple database structure, like:
Server
|
Database1
+ Tables
+ Programmability(stored procedures)
|
Database2
+ Tables
+ Programmability(stored procedures)
My question is, how do I need to modify my method to ensure so that it is hitting the correct database where the stored procedure resides?