Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to create persistent classes mapped to tables with a composite primary key at runtime

$
0
0

When you have a table with a composite key, a usual solution is to declare a structure for the key member as described in the How to create a persistent object for a database table with a compound key article. If the database schema is not known as design time, and you need to create persistent classes at runtime, there is no option to create a structure-like entity as this functionality is supported only for real types via Reflection. The example demonstrates how to create a custom XPCustomMemberInfo descendant with nested members support.

See also:
K18482: How to create persistent metadata on the fly and load data from an arbitrary table

Question Comments


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>