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.

About Jesse Liberty

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 will be released early in 2025. Liberty is a Senior SW Engineer for CNH and he was 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 Microsoft MVP.
This entry was posted in API, Essentials. Bookmark the permalink.

24 Responses to New Series: Creating APIs in .NET

  1. casino games says:

    On this platform, you can discover a great variety of online slots from famous studios.
    Visitors can try out traditional machines as well as new-generation slots with high-quality visuals and bonus rounds.
    If you’re just starting out or a casino enthusiast, there’s a game that fits your style.
    casino slots
    Each title are available round the clock and optimized for PCs and smartphones alike.
    You don’t need to install anything, so you can jump into the action right away.
    Platform layout is intuitive, making it quick to browse the collection.
    Sign up today, and dive into the thrill of casino games!

  2. DavidTwelt says:

    The site features off-road vehicle rentals throughout Crete.
    Visitors can easily rent a vehicle for travel.
    Whether you’re looking to travel around mountain roads, a buggy is the exciting way to do it.
    https://unsplash.com/@buggycrete
    All vehicles are well-maintained and offered with flexible plans.
    Using this website is user-friendly and comes with no hidden fees.
    Begin the adventure and experience Crete from a new angle.

  3. Jamescrumn says:

    This online pharmacy provides a broad selection of pharmaceuticals for budget-friendly costs.
    You can find both prescription and over-the-counter drugs to meet your health needs.
    We work hard to offer trusted brands at a reasonable cost.
    Fast and reliable shipping ensures that your medication is delivered promptly.
    Experience the convenience of shopping online with us.
    cenforce tablets

  4. MichaelVilla says:

    It’s alarming to realize that nearly 50% of patients make dangerous medication errors due to lack of knowledge?

    Your wellbeing should be your top priority. Every medication decision you implement significantly affects your body’s functionality. Staying educated about medical treatments should be mandatory for disease prevention.
    Your health depends on more than swallowing medications. All pharmaceutical products interacts with your body’s chemistry in specific ways.

    Consider these critical facts:
    1. Taking incompatible prescriptions can cause fatal reactions
    2. Over-the-counter allergy medicines have potent side effects
    3. Self-adjusting treatment reduces effectiveness

    For your safety, always:
    ✓ Research combinations via medical databases
    ✓ Review guidelines in detail before taking medical treatment
    ✓ Consult your doctor about potential side effects

    ___________________________________
    For reliable pharmaceutical advice, visit:
    https://my.archdaily.com/us/@kamagra-for-affordable-effective-and-long-lasting-male-enhancement

  5. casino slots says:

    On this platform, you can discover lots of casino slots from leading developers.
    Users can experience traditional machines as well as modern video slots with stunning graphics and exciting features.
    If you’re just starting out or an experienced player, there’s always a slot to match your mood.
    casino
    The games are ready to play anytime and designed for PCs and smartphones alike.
    No download is required, so you can jump into the action right away.
    Site navigation is intuitive, making it simple to explore new games.
    Join the fun, and enjoy the thrill of casino games!

  6. Dustinser says:

    Mechanical watches will continue to be in style.
    They symbolize engineering excellence and provide a human touch that modern gadgets simply don’t replicate.
    Each piece is powered by precision mechanics, making it both reliable and elegant.
    Collectors admire the hand-assembled parts.
    https://bx24.avers35.ru/company/personal/user/161/blog/1835/
    Wearing a mechanical watch is not just about checking hours, but about making a statement.
    Their styles are classic, often passed from one owner to another.
    All in all, mechanical watches will never go out of style.

  7. slot casino says:

    On this platform, you can discover a great variety of online slots from top providers.
    Players can try out traditional machines as well as modern video slots with high-quality visuals and bonus rounds.
    Even if you’re new or a seasoned gamer, there’s a game that fits your style.
    casino games
    The games are instantly accessible 24/7 and designed for PCs and tablets alike.
    You don’t need to install anything, so you can jump into the action right away.
    Platform layout is intuitive, making it convenient to browse the collection.
    Sign up today, and enjoy the excitement of spinning reels!

  8. Hairstyles says:

    As a Newbie, I am always exploring online for articles that can aid me. Thank you

  9. Hairstyles says:

    You completed certain nice points there. I did a search on the issue and found the majority of people will consent with your blog.

  10. I’m not sure exactly why but this web site is loading very slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later and see if the problem still exists.

  11. Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me?

  12. Hairstyles says:

    Hey there, You’ve performed an incredible job. I will definitely digg it and personally suggest to my friends. I am confident they will be benefited from this web site.

  13. Thanks a lot for sharing this with all folks you really recognise what you’re speaking approximately! Bookmarked. Please additionally talk over with my site =). We will have a link change arrangement among us!

  14. you’re really a good webmaster. The site loading speed is incredible. It seems that you’re doing any unique trick. Moreover, The contents are masterpiece. you have done a great job on this topic!

  15. Very nice post. I simply stumbled upon your blog and wanted to mention that I’ve really loved surfing around your blog posts. In any case I抣l be subscribing on your feed and I am hoping you write once more soon!

  16. Thanks for your write-up. I also believe that laptop computers are getting to be more and more popular right now, and now are sometimes the only type of computer included in a household. It is because at the same time potentially they are becoming more and more inexpensive, their computing power keeps growing to the point where these are as powerful as desktop computers coming from just a few years back.

  17. Parenting says:

    Please let me know if you’re looking for a writer for your blog. You have some really good posts and I believe I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please shoot me an email if interested. Thank you!

  18. Sherwood says:

    This piece is really impressive. Really grateful for this. Such helpful content deserves recognition. Take a look at the content on Kanye West posters. If you’re into Kanye West’s work, this post is highly recommended. You’ll find some great ideas. Hoping for more great content from you in the future! https://www.tumblr.com/kanye-west-posters/751574461874094080/kanye-west-posters

  19. Раскрутка группы в ВКонтакте имеет быть поэтапным процессом, требующим времени и усилий.
    Вот несколько назначений,
    коие посодействуют для ускорить данный
    процесс:

    Определите целевую аудиторию: Понимание, кто ваша аудитория,
    поможет для творить контент, который несомненно
    увлекателен как раз ей.

    Качественный контент: Публикуйте занимательные
    и полезные посты, фото, видео, которые заинтересуют внимание пользователей.

    Используйте всевозможные форматы, чтобы
    поддерживать интерес.

    Регулярность публикаций: Создайте расписание постов.
    Регулярный контент может удерживать аудиторию и завлекает свежих подписчиков.

    Реклама в иных группах: Разместите рекламу вашей группы в других модных группах, что несомненно
    поможет заинтересовать новых подписчиков.

    Используйте таргетированную рекламу: Реклама ВКонтакте дозволяет настраивать мотивированную аудиторию по разным аспектам (возраст, интересы,
    геолокация и т.д.), что помочь эффективно завлекать свежих участников.

    Взаимодействие с подписчиками: Отвечайте на комменты сео продвижение вк сео продвижение вк, проводите выборочные опросы и обсуждения, постарайтесь
    делать функциональное сообщество
    снутри группы.

    Мировые промоакции и конкурсы:
    Проводите конкурсы, розыгрыши призов, что может гораздо увеличить активность
    аудитории и привлечь свежих подписчиков.

    Обратная ассоциация: Прислушивайтесь к мнению вашей аудитории и учитывайте просьбы,
    это поможет превосходнее взять в толк,
    собственно нравится вашим подписчикам.

    Сотрудничество с блогерами: Найдите блогеров либо фаворитов
    воззрений в вашей нише и
    предложите им сотрудничество, собственно может
    посодействовать привлечь их аудиторию.

    Анализируйте результат: Используйте инструменты специалисты для оценки эффективности ваших поступков и корректируйте стратегию в зависимости от приобретенных данных.

    Постоянно экспериментируйте с различными методами продвижения и сыщите те, коие другого,как всего работают
    для вашей конкретной группы и аудитории.

Leave a Reply to Sherwood Cancel reply

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