开发者

How to organize / structure methods into namespaces in a WCF service?

What is considered as best-pratice when it comes to organizing / structuring methods in a WCF Service?

Let's assume I have a .net dll that I want to expose through a 开发者_Python百科WCF Service.

The .net dll has a namespace structure like this:

Root
-- > SubNameSpace1
-- > SubNameSpace2
-- > -- > CategoryA
-- > -- > CategoryB
-- > SubNameSpace3

How would I expose this namespace structure through a WCF Service? (Because I don't want all methods from all namespaces to be merged as methods of the client object that calls the service.)

When is it appropriate / recommend to create different *.svc files? (in relation to my namespace structure)


The best practice is to not expose DLLs through services. Instead, design a service that exposes a coherent set of functionality in a Service-Oriented manner. Then, implement that functionality using the DLL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜