Hi, is it at all possible to create a standalone entity if you are given a collection? Or to extract an entity from it by it's primary key?
My situation is that I have a datasource bound to a gridview and I need to be able to access the particular entity that was selected, however I do not know the entitycollection that was used to create the datasource as it came from a dropdown list. (It could be one of about 20)
I have the entity name as a string and I have the collection of entities that was used to generate the datasource, I also have the primary key value of the selected entity, I just don't have the entity itself. Is there any way to get this from the collection, or perhaps to create an entity based only on the string version of its name?
Not sure I have explained this very well!
Thanks,
Darren