Marian Vasilescu February 6, 2020

Build and deploy your REST Web API in seconds, no code required? Daniel Jacobson, Director of Engineering at Netflix, writes in his influential API strategy book that REST should be the default choice for any new API you write today, and Google Insights reveals that REST overtook SOAP as the most popular API style in 2008, and has increased its dominance ever since. This pervasiveness of REST is one of its key strengths; you are not only choosing a technology, you are also joining an enormous ecosystem of tools, best practices and developers.

Another advantage of SOAP is that it offers built-in retry logic to compensate for failed communications. REST, on the other hand, doesn’t have a built-in messaging system. If a communication fails, the client has to deal with it by retrying. There’s also no standard set of rules for REST. This means that both parties (the service and the consumer) need to understand both content and context. At the end of the day, the best protocol is the one that makes the most sense for the organization, the types of clients that you need to support, and what you need in terms of flexibility.

In RESTful Web Services Cookbook, Chief Engineer at eBay (and former Yahoo Architect) Subbu Allamaraju suggests an alternative approach called snapshots. For example, if an order manager wants to see some specific statistics (5 latest orders, 5 biggest clients, etc.) then we can create a snapshot resource that finds and returns all these information: I personally like the snapshot approach better, because it doesn’t feel like querying a database. But with that said, the snapshot approach requires an intimate knowledge of the API user, and the extra order top-level resource will offer more flexibility.

Use Visual Studio 2017 to create an empty Web API project. Make sure you add unit tests to the solution. This empty solution will be used as a stub for the generated code. Step 2 Run InstantWebAPI application, select the stub Visual Studio solution file (.sln) created in first step. Using a database connection dialog create a connection string to your server. Application supports MS SQL server, Express or Azure. Once a connection is established to the database, select the tables or views for which Web API needs to created and start the code generator. See additional details at Create ASP.Net Web API from MS SQL in Minutes With Instant Web API.