简体   繁体   中英

Consuming WCF service via service reference in .NET 4.0

I've been reading a little bit on WCF, and the general consensus on the web is that consuming a WCF service via Visual Studio's add service reference isn't the preferred/right way as it adds a lot of bloatware code.

However, most of these posts are from 2009, with .NET 3.5.

I'd like to know if this situation has improved with .NET 4.0, or .NET 4.5, and is it still recommended to consume a service manually over the VS way?

Is the performance difference between the manual and service reference way very glaring?

I don't think that it's ever been performance difference between manual and service referenced proxy classes. It generates unused code, yes. But if you want, you can manually clean up it.

Hand written proxy will save you milliseconds during compilation. But you will spend way more time on writing proxy class manually and testing it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM