AkmecNurik
AkmecNurik

Reputation: 205

How can I manage ids of entities in Linq2SQL?

Such a task: we have 2 tables in our L2S Entity classes. It needs to manage with current fields of current tables by numbering em somehow.

Exact question is How can I point to the exact field of exact table without using entity relation names? Such as TmpLinqTable[2] instead of TmpLinqTable.TableField.

Moreover if it can be managed by ids of the entity, not the table.

Upvotes: 1

Views: 51

Answers (1)

Jason Turan
Jason Turan

Reputation: 1352

So my understanding of what you are trying to do is to log changes that happen to your entites. Is that correct? You might want to look into the GetModifedMembers method on the Table class. Here's an interesting link...

http://geekswithblogs.net/steveclements/archive/2008/04/15/linq-to-sql-property-changed--changing-logging.aspx

Upvotes: 1

Related Questions