.net - How to get primary key columns out of a TSqlObject instance? -


i'm trying primary key columns out of tsqlobject instance in following manner:

var constraint = table.getreferenced(modelschema.primarykeyconstraint, dacqueryscopes.all); 

of course doesn't work, getreferenced method expects instance of modelrelationshipclass instance.

so how can done?

code pk constraint given table bit this:

private static tsqlobject getprimarykeyconstraint(tsqlobject table) {     ienumerable<tsqlobject> constraints = table.getreferencing(primarykeyconstraint.host, dacqueryscopes.userdefined);     return constraints.first(); } 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -