0

I want to build a simple web service in C#/.NET that exchange DataTable objects (ADO.NET).

At the backstage there will be several table-valued functions (or methods in C# jargon) that will receive DataTable objects as input parameters, make some operations on them, and generate some output DataTable objects that will be sent back to web service consumer.

I don't have much experience with web services, so it must be a simple and flexible solution (or framework) for my purpose: Making operations on data tables.

My second question is, how can the content of DataTable's be encrypted if they contain sensitive data?

tuncalik
  • 1,124
  • 1
  • 14
  • 20
  • 2
    You could just use WebApi. You'll have to come up with some serialization method to go to and from `DataTable`, but that shouldn't be too difficult. As for encryption, you could just use HTTPS. It's pricy if you need a custom domain, but if you can live with a free website on Azure (and I assume you can since this will just be an API), that would do it for you. – Matthew Haugen Jul 18 '14 at 08:28
  • On the other hand, you might want to spend a day or two switching it to a more meaningful model if you can. I assume you're switching to use an API in an existing application, so you could just shift your line a bit to do `DataRow` parsing on server-side. You could also look into some tools that will do the conversion automatically. I've never used any of them, but I know one was shown at //Build/ so I assume they work at least kind of well. – Matthew Haugen Jul 18 '14 at 08:31
  • Thanks, I studied Web Api in the meanwhile, and its differences compared to the WCF approach, and came to the conclusion that there can be a simple solution with WebApi as you suggested. But I don't understand why I would need DataRow parsing. – tuncalik Jul 23 '14 at 08:46
  • Some clues can be found here for exchanging DataTable objects with WebApi: http://stackoverflow.com/questions/14571927/net-webapi-datatable I realized that I don't actually need to use the complex DataTable structure at all for my purposes, because I use a simpler data structure (MatrixTable) for representing data tables. – tuncalik Jul 23 '14 at 09:02

0 Answers0