1
votes

I'm using Ria service class library. This contains 2 library named RiaClasslibrary RiaClasslibrary.Web.

Riaclasslibrary.Web contains ADO.NET entity data model and named BaseModel. BaseModelcontains tPage class.

My problem is

I'm inserting separated tPage class. This class contains 2 public property. show below

public sealed partial class tPage : EntityObject
{        
    public List<tPage> Children { get; set; }
    public tPage Parent { get; set; }
    public Boolean IsSelected { get; set; }
}

After I'm inserting DomainService and building RiaClasslibrary.Web class library. But ria service generated code doesn't contains above properties.

You have a question. Why you separate tPage class. You simply insert those 3 property in Modelbase.Designer code.
My answer is: Database doesn't contain those 3 property and If I'm inserting properties in the code, properties removed after updating Entity Model.

1

1 Answers

1
votes

@ebattulga

I don't know if you still have this issue, but I will post the answer because I came to similar issue.

The answer for

After I'm inserting DomainService and building RiaClasslibrary.Web class library. But ria service generated code doesn't contains above properties.

is quite easy but hard to find.

You can read here in section "Shared Code" http://www.silverlightshow.net/items/WCF-RIA-Services-Part-5-Metadata-and-Shared-Classes.aspx

If you want to see custom properties from partial classes on the Client you have to rename class file name from MyClass.cs to simply MyClass.shared.cs. This will create partial class in the code generated Client side.

HTH

Daniel Skowroński