Underlying Table and Column names for SELF SERVICING

Posts   
 
    
trevorg
User
Posts: 104
Joined: 15-Nov-2007
# Posted on: 24-Feb-2010 16:04:18   

How does one go about determining the underlying table and column names for LLBLGen entities and fields/properties in a self servicing environment? I've seen several references to how to do this with adapter but was unable to find for Self Servicing.

I thought I had found the solution for fields in FieldInfoProviderSingleton.GetInstance().GetFieldInfo() but that seems to be not the right place.

But I am wanting this for both table names and column names.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 24-Feb-2010 16:07:28   

It's easier in SelfServicing, as these info are in the EntityField class (SourceColumnName & SourceObjectName properties).

e.g.

var colName = myEntity.Fields["myField"].SourceColumnName;
trevorg
User
Posts: 104
Joined: 15-Nov-2007
# Posted on: 24-Feb-2010 16:15:22   

Wow, fast reply!

Actually, I just found that after I posted!

Now, is it as easy to find a table name for an entity?? This I can't seem to find....

trevorg
User
Posts: 104
Joined: 15-Nov-2007
# Posted on: 24-Feb-2010 16:17:27   

Aw, sorry!

ReadOnly Property SourceObjectName() As String Member of SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo Summary: The name of the source object which holds SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo.SourceColumnName. Can be a view or a table (or synonym of those). Used to generate SQL on the fly.