New Series: Creating APIs in .NET

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)
  • AutoMapper

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.

Unknown's avatar

About Jesse Liberty

** Note ** Jesse is currently looking for a new position. You can learn more about him at https://jesseliberty.bio Thank you. Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen online courses. His latest book, Building APIs with .NET, is now available wherever you buy your books. Liberty was a Team Lead and Senior Software Engineer for various corporations, a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a 13 year Microsoft MVP.
This entry was posted in API, Essentials. Bookmark the permalink.

762 Responses to New Series: Creating APIs in .NET

  1. Patrickfuh's avatar Patrickfuh says:

    https://medfrance.top/# Le gГ©nГ©rique de Viagra

  2. Georgesuete's avatar Georgesuete says:

    https://medfrance.top/# Viagra en france livraison rapide

  3. Currently it appears like Drupal is the top blogging platform available right now. (from what I’ve read) Is that what you’re using on your blog?

  4. Mariela Sen's avatar Mariela Sen says:

    Can I just say what a relief to uncover someone that really understands what they are discussing over the internet. You actually realize how to bring a problem to light and make it important. More people should read this and understand this side of your story. I can’t believe you aren’t more popular since you surely possess the gift.

  5. Fobertnap's avatar Fobertnap says:

    It is always a pleasure to find a post that respects the reader’s time by getting straight to the point while still providing all the necessary context required to fully grasp the broader implications of the subject at hand.

    https://dollyolive.co.uk/

  6. Wow that was strange. I just wrote an incredibly long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say great blog!

  7. Драфт сюрвей — это способ определения осадки судна для установления массы перевозимого товара.
    Этот принцип опирается на физический закон вытеснения и служит для определения объёма груза по разности водоизмещения.
    Измерение осуществляется перед и по окончании погрузки или разгрузки, чтобы установить фактическое количество транспортируемого товара.
    https://eurogal-surveys.ru/
    Действие состоит из снятия показаний углубления в нескольких точках и проведения корректировок на удельный вес жидкости.
    Эта методика повсеместно применяется в судоходстве для коммерческих расчётов и проверок.
    Это является достоверным способом проверки массы товаров, одобренным глобальными конвенциями.

  8. Angla Ridens's avatar Angla Ridens says:

    Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m not writing all that over again. Regardless, just wanted to say superb blog!

  9. Can I simply say what a comfort to discover a person that actually knows what they are talking about on the internet. You actually realize how to bring a problem to light and make it important. More and more people have to look at this and understand this side of your story. I can’t believe you are not more popular because you surely have the gift.

  10. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

  11. Richardweivy's avatar Richardweivy says:

    https://modafinil.pro/# Modafinil for focus and productivity

  12. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

Leave a Reply

Your email address will not be published. Required fields are marked *