WebServices and Entity

K

kishor

I have a following problem... I am looking for best and efficient solution
for this problem.

I have following entities ..(c#)

public class Dog
{
.... some Properties and methods.....

Dogs _friendDogs = new Dogs() ;

Public Dogs Friends()
{
get
{
return _friendDogs;
}
set
{
_friendDogs= value;
}

}

}

Public class Dogs : CollectionBase
{
........
}



When I am working with Dog and Dogs its is working fine without any error in
same project but when I am passing this entity through web service
I get an error because webservice convert this dogs to some array list and
cant be converted back to entity.



[WebMethod]
public Dogs GetFriendsDog()
{
.......
Return Dogs

}

Problem comes here on the following last line

Dogs somedogs = new Dogs();

somedogs = somewebService.GetFriendsDog() ;



Please suggest best method for this.

Regards
Kishor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top