New Posts New Posts RSS Feed: Parent-Child using DevForceEF
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Parent-Child using DevForceEF

 Post Reply Post Reply
Author
oldie View Drop Down
Newbie
Newbie


Joined: 07-Jan-2009
Location: UK
Posts: 5
Post Options Post Options   Quote oldie Quote  Post ReplyReply Direct Link To This Post Topic: Parent-Child using DevForceEF
    Posted: 07-Jan-2009 at 4:29am
Hi, I'm experimenting with the DevForce and trying to query a table which is self refrencing to create a hierarchy. I renamed the entity navigation properties to Parent and Children.
I want a query to return a list of children for a particular parent but get a run time error:
 
Execution of query against the server was successful but execution of query against the local cache failed
 
Code Snippet:
DomainModelEntityManager _manager = DomainModelEntityManager.DefaultManager;
BindableList<Areas> _areas = new BindableList<Areas>();

private void LoadData() {

_areas.ReplaceRange(_manager.Areas.Where(c => c.Parent.Area.Contains("TestParent")));

}

Does the local cache need initialising first?
 
DevForceEF 4.2.2
VS2008 SP1
Windows XP
MSSQL Server 2005
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down