Print Page | Close Window

Parent-Child using DevForceEF

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1050
Printed Date: 27-Mar-2025 at 7:26pm


Topic: Parent-Child using DevForceEF
Posted By: oldie
Subject: Parent-Child using DevForceEF
Date 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



Print Page | Close Window