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

WCF error calling method that returns reverse mapped class

1 Answer 45 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.
Adam
Top achievements
Rank 1
Adam asked on 14 Sep 2009, 05:31 PM
Hi,

I have created a dummy persistent class that I intend to map the results of a stored procedure call with. The class looks like this:

namespace ORM
{
    [DataContract]
    [Persistent]
    public class DisplayTag
    {
        public DisplayTag() { }
        [DataMember]
        public Guid TagId { get; set; }
        [DataMember]
        public string TagType { get; set; }
        [DataMember]
        public string TagData { get; set; }
        [DataMember]
        public double Weight { get; set; }
    }
}


When I return an enumeration of this class as the results of a web service method call I get a server error. If I put a breakpoint in my server side method it is never reached. I am using silverlight 3 as the client so the error comes across as not found which is not very helpful at all. If I remove the persistent attribute in this class everything works fine (although I can't use it to map to the stored procedure). How can I get the wcf method to return this class when the persistent attribute is used?

Thanks,

Adam

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 16 Sep 2009, 01:50 PM
Hello Adam ,

You can try not to use autogenerated properties but explicitly defined private fields and public properties. Please, let us know if this does not help.

Kind regards,
Alexander
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or