While I’m still happily ensconced at CNH Industrial, I have changed my job. I’m no longer writing mobile applications (for the first time in about 7 years!) but rather am writing APIs using ASP.NET Core and C#. -The plan is to have a book on creating APIs (how-to, best practices, patterns, etc.) next year. In the interim, I’ll be writing a series of blog posts covering such topics as how to get started, software and tools you’ll need, REST, and much more.
As part of this series, I’ll create a dead-simple real-world example of a car selling and buying application, suggested by Daniel Brevitt (technical editor of .NET MAUI For C# Programmers). This application will consist of four major parts:
- The backend SQL Server database
- The front end for administrators (for inventory, etc.)
- The front end for customers (for buying or selling)
- The API that connects the front end to the back end
We’ll create a very simple SQL database using SQL Server and SSMS, and take advantage of Dapper: a simple ORM (Object Relational Model). We will not cover Entity Framework as our focus will be on the APIs, not the back end.
Similarly, the front end will be a very simple application — though at first I’ll simply use Postman rather than building out the front end. In fact, given how important and powerful Postman is, I may never get around to building a real front-end. Getting familiar with the Postman is more important for our purposes.
We will build three types of APIs
- Traditional APIs built using controllers in ASP.NET Core and .NET 7/8
- Minimal APIs
- Azure Functions
My focus in the first posts will be on the first two types, so that we can work locally without having to use Azure for now (there are tools for working with Azure functions locally, but we’ll hold off on that). In fact, we’ll create such a simple database that you can recreate it locally (and I’ll put all the code for this series up on GitHub).
For these posts, I anticipate developing on Windows using:
- Visual Studio 2022
- C# – probably nothing more advanced than C# 7 or 8, though bits of later versions may appear from time to time
- SQL Server (latest)
- SQL Server Management Studio (SSMS) that comes with SQL Server
- Postman (latest)
- Dapper (latest)
All of the software we’ll be using is free (the community editions are fine).
In the next post I’ll create the database and its preliminary tables.