On

Web API code generator on MS SQL

Posted by William

1 Click Rest API from your MS SQL database? A well designed API is self-documenting. If you know how to work with one REST API, you will quickly learn the quirks of others. InstantWebApi is an API-first product. I spent a lot of time on API design. My intent is to be able to hire multiple teams in parallel, giving them access to my API, and seeing which implementation I like best. They will all be compatible. I can then simply discontinue the less interesting implementation projects.

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.

The promise is that if you wait with thinking about shared data until you know what business capabilities you need to offer, it will lead to a less database-oriented design. I think his approach is a good way to jolt you out of the database-driven mindset, but you need to be careful that you don’t end up designing a REST-RPC hybrid. What I also like about this approach is that it minimizes the interface and doesn’t expose all data by default, but hides internal data (like logging and configuration tables) from the client and instead focuses on what the client actually needs. This also fits beautifully with veteran API designer Joshua Bloch’s maxim saying that When in doubt, leave it out (from his highly popular presentation on API design), and it also harmonizes with the REST principle that a representation of a resource doesn’t need to look like the underlying resource, but can be changed to make it easier for the client. So feel free to think about what would be the easiest interface for the API user, and then let your resource take data from multiple tables and leave out columns that are irrelevant to the job that clients need to perform.

I see that this software is using Visual Studio 2017. Do I need a license for this product? No, as a single developer you can qualify for the free edition. You can download it from Microsoft site: Visual Studio Community 2017 I don’t have a license for Microsoft SQL Server. Do I need one? No, Microsoft provides a free download for SQL Express Edition server. You can get yours here. I see that a backup of AdventureWorks database is provided with the installation. How can I restore it on the server? In order to restore the backup file please download SSMS from this site: SQL Server Management Studio (SSMS). Once the code is generated am I able to modify it? Yes, by purchasing a license you should be able to modify the code however you see fit. Discover more details on Create ASP.Net Web API from MS SQL in Minutes With Instant Web API.