i have function that return an object
haw can i retrive some attribute of this object in the main page
[OperationContract]
public Employe ListerEmpById(int id)
{
using (var ec = new EntrepriseDataContext())
{
Employe req = (from p in ec.Employes
where p.Id==id
select p).SingleOrDefault();
return req;
}
}
deepak vsPosted Mar 12, 2012, 9:06 AM
Silverlight supports asynchronous call to wcf.So in order to consume
it first you have to call the async handler.
Then in the completed/call back function ,you can fetch the
Employe object in e.result;
Thanks
Deepz
Ahmed BoughattasPosted Mar 1, 2012, 7:32 AM
sc.ListerEmpByIdAsync() or sc.ListerEmpByIdCompleeted
Mamta MPosted Mar 1, 2012, 4:50 AM
ServiceClient sc= new ServiceClient(); //where I am assuming Serviceclient is your proxy class for the WCF service.
var someobj = sc.ListerEmpById(whatever int you want to pass here);
For full examples, see the articles on the right of this page.