This is a migrated thread and some comments may be shown as answers.

[Solved] IList members values are getting lost

1 Answer 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Prasanna
Top achievements
Rank 1
Prasanna asked on 04 Jan 2011, 08:07 AM
Hi Team,

We are new to ORM.  We have created the ORM objects for the database and when we query a table, it pulls all the fields along with the values from the other foreign tables related to this.  Although all the values are available in the current object, when we try to return the object to another program through a web service, some of the values were found to be missing. After digging through the code, we found that some of the members of the ORM class were generated of type IList, which are by nature not serializable, hence those members weren't passed through the web service. We tried changing the IList into List, but the program is not compiling.  Is there a way out of this?

Regards.

1 Answer, 1 is accepted

Sort by
0
Serge
Telerik team
answered on 05 Jan 2011, 02:54 PM
Hi Prasanna,

 First of all I would like to mention that using the OpenAccess objects that you already have for transport object over the service is not recommended. The solution that I would like to suggest is using DTO objects. This way you will have more control on what is happening and how object are passed trough the service.

Please have a look at this knowledge base article that shows how such object can be created. You should also know that in the Telerik OpenAccess SDK there is an N-Tier example using WPF and WCF Plain services with these templates that you can use as a reference.

I hope this proves to be helpful.

Kind regards,
Serge
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
Tags
General Discussions
Asked by
Prasanna
Top achievements
Rank 1
Answers by
Serge
Telerik team
Share this question
or