This is my mapping class:
class MyTableMap : ClassMap<MyTable>
{
public MyTableMap()
{
Schema("mySchema");
Id(x => x.id);
Map(x => x.SomeString);
}
}
This works fine for the Table ([mySchema].[MyTable]) in my first database.
But this table ("MyTable") exists in (actually a lot of) different databases, but for any reason the schema is always named different (this I dont have any control of):
So in the Database "OtherDB" there is the Table [SomeOtherSchema].[MyTable] with the same structure as [mySchema].[MyTable] in the first db.
For obvious reasons I dont want to create a different mapping class for every database.
So: Is there a way to change the schema of the mapping class so I just have to create one mapping class (Without using a singelton!)?