views:

27

answers:

0

I am new to using RIA services and the Entity Framework so this is probably very simple.

I am trying to extend an entity class using a public partial class in a separate file. My goal is to simply override the ToString() method.

Doing this is as simple as...

public partial class ClassName
{
    public override string ToString()
    {
        return "new toString function";
    }
}

I am using RIA Services to project this onto the Silverlight clientSide however and it is not translating.

After looking around I found the [DataMember] attribute which I can add to a property to make it serialize and make it visible on the clientSide project

public partial class Department
{
    [DataMember]
    public String ToStringProperty
    {get; set;}
}

however I can't figure out how to use something like [DataMember] on a method

Anyone know how?

related questions