I am working on a silverlight project using the ADO.NET POCO generator.
The problem is that when I use a grid to print data from the Database, An exception occurs , and this is what is written :
Server NOTFOUND and the location for the error is :
System.Collections.ObjectModel.ObservableCollection
this is an example of a method that I used :
[OperationContract]
public List
{
Esprit_FleetEntities db = new Esprit_FleetEntities();
var emp = from e in db.Employees
select e;
return emp.ToList();
}
In fact, When I don't use the POCO project and generator it works, but usiing this hierarchy causes a problem I think.
So can you Help me PLEASE!
thanks

Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 28, 2012, 12:10 AM EST
Try..
[OperationContract]
public Employees[] GetEmployees()
{
Esprit_FleetEntities db = new Esprit_FleetEntities();
var emp = from e in db.Employees
select e;
return emp.ToArray();
}
Hope this help.
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 28, 2012, 12:24 AM EST
Please refer below link,
it explain how to achive this,
http://msdn.microsoft.com/en-us/library/system.servicemodel.serviceknowntypeattribute.aspx
hope this help.