Yes, there is a way. From your previous threads I assume that you are using Adpater templaset. So, create a class file in your DBSpecific project and write this:
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace <YourRootNameSpace>.DatabaseSpecific
{
public partial class DataAccessAdapter
{
public string GetCatalogNameForEntity(IEntity2 entity)
{
return PersistenceInfoProviderSingleton.GetInstance().GetAllFieldPersistenceInfos(entity)[0].SourceCatalogName;
}
}
}
... and the usage:
[TestMethod]
public void GetCatalogName()
{
string catalog = new DataAccessAdapter().GetCatalogNameForEntity(new CustomerEntity());
Assert.AreEqual("Northwind", catalog);
}