I am trying to create an Entity key for a table, in order to insert a row in the table without loading the related tables.
I am trying to use this contructor: http://msdn.microsoft.com/en-us/library/bb739024.aspx
The code example in the above link uses a different contructor.
The code I have so far is:
KeyValuePair<String, Object> key1 = new KeyValuePair<string,object>("MainId", 1);
KeyValuePair<String, Object> key2 = new KeyValuePair<string,object>("SubId", 2);
List<KeyValuePair<String, Object>> keyList = new List<KeyValuePair<String, Object>>();
keyList.Add(key1);
keyList.Add(key2);
EntityKey entitykey = new EntityKey(
How can I complete the creation of the entity key?
Edit:
To add multiple keys:
That should do the work.