WCF error calling method that returns reverse mapped class

Thread is closed for posting
2 posts, 0 answers
  1. Adam
    Adam  avatar
    30 posts
    Member since:
    Jun 2009

    Posted 14 Sep 2009 Link to this post

    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
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 16 Sep 2009 Link to this post

    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.
Back to Top