I'd like to know how to get the list of foreign key referenced tables and also the cardinality level (one-to-one, one-to-many, many-to-one,manay-to-many)?
To get a list of foreign key referenced tables from a specific table you would use the TableSchema.ForeignKeys property. To figure out if a table is part of a relationship you would need to use logic like this code.google.com/.../Entity.cs . Please take a look at the GetParentAssociations() and GetChildAssociations() methods.
I'd recommend using our SchemaHelper framework (latest version is included in the PLINQO EF and PLINQO nHibernate templates) if you are creating a business object framework. This framework uses interfaces and sits on top of SchemaHelper to provider you with a very nice model for creating framework templates (nTier/Business Object templates). The documentation is sparse as we haven't officially released it as a framework but all of our templates use it and are open sourced.
Please let us know if you have any questions.
CodeSmith Tools, LLC. Software Development Engineer
.NetTiers team | Visit http://www.nettiers.net
Where do I find the Association class referenced DLL(s)?
You can find the assembly references in the extracted common folder of the following download code.google.com/.../detail .
Please let us know if you have any questions