Before the code, i assume that you have created the relation ship between table in ADO.net Entities.
Here is mine,
CREATE TABLE [dbo].[tblRole](
[RoleID] [int] IDENTITY(1,1) NOT NULL,
[RoleName] [nvarchar](50) NOT NULL,
[IsActive] [bit] NOT NULL)
CREATE TABLE [dbo].[tblUser](
[UserID] [int] IDENTITY(1,1) NOT NULL,
[UserName] [nvarchar](50) NOT NULL,
[Password] [nvarchar](50) NOT NULL,
[RoleID] [int] NOT NULL,
[CreatedTime] [datetime] NOT NULL,
[IsActive] [bit] NOT NULL)
RoleID will be the foreign Key field.
In the entities, you need Create a navigation property against this field.
In domain service,
In silverlight part, you can call the service like this,
The code above is the sample everywhere people are using, i don't know whether there will be a chance that when the service loaded, but the complete event hasn't been attached to the object. For the safe operation, i think the following way is a better choice for doing this. Use CALLBACK function!!!!!
At last but not least, You must add [Include] attribute to the Navigation Property, or else, the data will not be transfered to SL client.