c# - Get all referencing columns to a referenced column in linq -


Say you have a sales label with sales, then you have two tables, sales order headers and sales reports that The reference order order is starting with the sales tables and salesperson, is there any way to find those two tables that it is using linq? I want to add a debug Attachment to my code so that I can update the piece of code whenever any other foreign key is linked against the constraint column.

  select from * info_chemaka.TABLE_CONSTRAINTS where CONSTRAINT_TYPE = 'foreign key' select [name] In form FKeyName, (SELECT o1. [Name] from sys.objects o1 where o1. [Object_id] = ParentTableName, (SELECT o2. [Name] sys.objects o2 where o2. [Object_id] = fk.referenced_object_id) If you really need column names, open the system in the stored procedures  sp_helpconstraint  and remove the logic from there. 


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -