How can I share Linq with datacontracts between WCF and Silverlight

0 vote star 1

I want to be able to share my data (classes created in the linq constructor for entities are decorated with the [DataContract] attribute.

I am trying to use the architecture detailed here: http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2 and try to reference my interfaces in my silverlight project using 'Add as link ', as described here: http://www.netfxharmonics.com/2008/12/Reusing-NET-Assemblies-in-Silverlight

The problem I am facing is referring to my service interface in my silverlight project.

My solution has the following projects:

ORM - contains the edmx Linq to Entities model (namespace: company.client.Service) - the classes in this are decorated with the DataContract attribute, etc.

ServiceInterface - contains interfaces (namespace company.client.Service) and a link to ORM for returned classes (Customer, etc.)

Service - contains the implementation of service interfaces (namespace company.client.Service) and ServiceInterface and ORM links for classes.

ServiceHost - contains only .svc files, as recommended at http://www.netfxharmonics.com/2008/11/Understanding-WCF-Services-in-Silverlight-2

WebSLHost - host for silverlight application

Gui is a silverlight GUI.

I want all projects to be standard .net builds, with the exception of silverlight gui, of course.

( http://www.netfxharmonics.com/2008/12/Reusing-NET-Assemblies-in-Silverlight), , , ORM .

, datacontract, linq, silverlight, , - , .

+5
6

, , "".NET "".NET(, , ); SOA...

, , . , , Silverlight EDMX DataContract ( ) - .

, mex, - - WCF Silverlight. . , DTO, EDMX WCF; DTO WCF ( EDMX), , , , . , .

+4

- , - linq-to-entities WCF . DataContract, ( ). WCF, , , , linq.

?

+1

, LINQ to Entities . .

, (DTO), . .

DataSet, DataTable - . , , Java. , , .NET - .NET, , .NET Silverlight. DTO, .

+1

, , , , EDM datacontracts Silverlight , .

, , linq sql datacontracts silverlight. , , -, . WCF Silverlight , .

0

Silverlight.net.

, MS! - , Linq to SQL . , Silverlight + WCF + Entity Framework? - ( Silverlight), , Entity Framework.

0

.

0
source

All Articles