tags:

views:

21

answers:

0

On the server side I have the following class:

public class Customer
{
    [Key]
    public int Id { get; set; }

    public string FirstName { get; set; }

    public string SecondName { get; set; }

    public string FullName { get { return string.Concat(FirstName, " ", SecondName); } }
}

The problem is that each field is calculated and transferred to the client (to the Silvelight application), for example 'FullName' property:

    [DataMember()]
    [Editable(false)]
    [ReadOnly(true)]
    public string FullName
    {
        get
        {
            return this._fullName;
        }
        set
        {
            if ((this._fullName != value))
            {
                this.ValidateProperty("FullName", value);
                this.OnFullNameChanging(value);
                this._fullName = value;
                this.RaisePropertyChanged("FullName");
                this.OnFullNameChanged();
            }
        }
    }

Instead of data transferring (that is traffic consuming, in some cases it introduces significant overhead). I would like to have a calculation on the client side (silverlight aplpication).

Is this possible without manual duplication of the property implementation?

Thank you.