2

I'm about to create a Windows Form Application in C# that a customer requested and I need that to be distributed so no direct call to DB. So I need to add a middle data communication between DB and application.

I have developed serveral windows form applications using WCF as data service but I would like to know if there is a benefit on using instead ASP.NET WebApi.

I guess I can achieve the same result with both approaches or is there any limitation by using Web API?

VAAA
  • 14,531
  • 28
  • 130
  • 253
  • Depends on your needs and your preferences. Check this out - _"[WCF and ASP.NET Web API](https://msdn.microsoft.com/en-us//library/jj823172(v=vs.110).aspx)"_ –  Mar 04 '17 at 01:34
  • webapi will be better. – ravindra Mar 04 '17 at 04:53
  • 1
    Consider these facts: ◘ Web API actions can only have a single complex parameter. ◘ Web API actions should be called using URL and if you want to make calling methods more elegant you need to create proxy yourself. ◘ WCF supports *Add Service Reference* and creates proxy classes automatic. ◘ In WCF If you decide to not use *Add Service Reference* then you can rely on creating `ChannelFactory` but there is no such mechanism for Web API. ◘ IN WCF you can rely on service contracts, while in Web API if you need such concept you need to create such concept yourself. – Reza Aghaei Mar 04 '17 at 07:05
  • @ravindra Why is that? –  Mar 04 '17 at 11:15

0 Answers0