Query DTO objects through WCF with linq to sql backend

后端 未结 3 842
臣服心动
臣服心动 2021-01-24 16:22

I am working on a project where we need to create complex queries against a WCF service.

The service uses linq to sql at the backend and projects queries to data transfe

3条回答
  •  轮回少年
    2021-01-24 17:10

    I believe that you can return DTO's by using OData services.

    Take a look at http://www.codeproject.com/Articles/135490/Advanced-using-OData-in-NET-WCF-Data-Services. Particularly the 'Exposing a transformation of your database' section. You can flatten your entity objects into a DTO and have the client run queries against this DTO model.

    Is that something you are looking for?

提交回复
热议问题