MSDN Archive Home
Help and FAQs
Perseus: Entity Framework EntityBag
All Resource Updates
Create New Discussion
Cannot build Perseus
Jun 12 2008 at 4:34 PM
Jun 12 2008 at 6:46 PM
I've downloaded both 1.0 and 1.1 versions and I can't buid any of them.
Studio cannot find extension method GetEntityKey in this row:
EntityKey targetKey = context.GetEntityKey(fullEntitySetName, target);
there exists method with such name but it has different parameters list & interface it applies to.
Well, actually I've found method with such a signature named CreateEntityKey(string, object). Was this method meant in that line?
Did anyone succeeded in using Perseus?
Jun 13 2008 at 11:55 AM
Jun 13 2008 at 12:10 PM
Great. It works. At least I succeeded in launching it and getting bag from service :)
Oct 10 2008 at 12:59 PM
For me, replacing GetEntityKey(fullEntitySetName, target);
by CreateEntityKey(fullEntitySetName, target);
did not seems to work because when I try to persist modifications I got an InvalidOperationException exception
The supplied EntityKey does not have a corresponding entry in the ObjectStateManager.
in the line just after :
EntityKey targetKey = context.CreateEntityKey(fullEntitySetName, target);
ObjectStateEntry targetStateEntry = context.ObjectStateManager.GetObjectStateEntry(targetKey); <---- Exception
Any idea ?
Thanks for your help.
Oct 10 2008 at 4:21 PM
Solution FOUND !
Replace : context.GetEntityKey(fullEntitySetName, target)
EntityObject e = target as EntityObject;
if (e != null && e.EntityKey != null)
targetKey = e.EntityKey;
targetKey = context.CreateEntityKey(fullEntitySetName, target);
Now it works on VS2008 SP1
Oct 31 2008 at 2:32 AM
Thanks very much! That works for me, too.
Sign in to post message or set email notifications
Manage Your Profile
MSDN Flash Newsletter
© 2008 Microsoft Corporation. All rights reserved.