I'm trying to figure out a way to get the underlying SQL table name for a given entity type. I've experimented around with the MetadataWorkspace queries and while I can get lots of information from the object or the storage space, I can't seem to figure out how to map between the two.
So say I have a type in the object model called Lookup - how do I find the tablename (wws_lookups) in the database?
I can query all the EntityType objects for CSpace and SSpace and I can see both listed correctly but I can't figure out how to get SSpace from CSpace.
Is there any way to do this?
Actually I've been through the same problem, and I've produced an abstract code snippet which gives you two
Dictionary<string,List<string>>
($table_name,$columns_name_list). First one has database Table + column name list, second one has local EF Entities + propertiesOf course you can add more checks against data type, btw imho that would force you to write insanely complicated code.
P&L
P.S. Sorry for the compressed style, I'm a lambda fanatic