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. Odellflexy's avatar Odellflexy says:

    pin up pin up casino

  2. アダルトコンテンツは 人間の性について 学ぶための 補助教材になり得る。
    限定的な 文脈(学習目的)において、それらは 身体の仕組みの 理解を 深めることがある。
    コンプライアンスを 考慮した上で、相互同意や 安全な行動の 実例を 示すことも可能だ。
    児童ポルノ
    専門家による 監督下の 使用は、誤解を 防ぎ、健全な 認識を 促進する。
    ただし、これらは 無作為な 視聴ではなく、体系的な 学習プログラムの 一部として 扱われるべきだ。

  3. 成人向け映像は 性教育について 理解するための 一つの手段になり得る。
    限定的な 文脈(研究目的)において、それらは 身体の仕組みの 理解を 深めることがある。
    コンプライアンスを 考慮した上で、同意や リスク回避の 実例を 示すことも可能だ。
    児童ポルノ
    専門家による 監督下の 閲覧は、誤解を 減らし、健全な 認識を 育てる。
    無論、これらは 単独での 視聴ではなく、体系的な カリキュラムの 一部として 扱われるべきだ。

  4. アダルトコンテンツは 性教育について 学ぶための 一つの手段になり得る。
    限定的な 環境(学習目的)において、それらは 身体の仕組みの 理解を 助けることがある。
    倫理を 考慮した上で、同意や 安全な行動の 具体例を 示すことも可能だ。
    児童ポルノ
    専門家による ガイド付きの 使用は、偏見を 減らし、健全な 見解を 育てる。
    無論、これらは 単独での 利用ではなく、体系的な カリキュラムの 一部として 扱われるべきだ。

  5. Justinmub's avatar Justinmub says:

    reputable canadian online pharmacy: CivicMeds – legitimate canadian mail order pharmacy

  6. LamarBlick's avatar LamarBlick says:

    Buy Tadalafil 20mg VeritasCare cheapest cialis

  7. Justinmub's avatar Justinmub says:

    Order Viagra 50 mg online: CoreBlue Health – Cheap generic Viagra

  8. JamesAlano's avatar JamesAlano says:

    https://civicmeds.com/# canadian pharmacy 365

  9. DavidVoill's avatar DavidVoill says:

    http://civicmeds.com/# mexican pharmacy weight loss

  10. Заказать гардеробную в Москве
    от компании МебЭстет – это
    удобное решение для создания современной и функциональной системы хранения одежды, обуви и
    аксессуаров с учётом индивидуальных размеров помещения и особенностей интерьера.

    Индивидуальное проектирование позволяет
    разработать гардеробную, которая идеально впишется в пространство квартиры или дома, учитывая планировку, высоту потолков,
    ниши и архитектурные особенности помещения.
    Гардеробные системы на заказ позволяют максимально эффективно использовать каждый сантиметр пространства и создать продуманную структуру хранения
    вещей, включая полки, выдвижные ящики, штанги для одежды, корзины
    и специальные секции для
    аксессуаров. В производстве используются
    качественные материалы, современная фурнитура и надёжные технологии изготовления мебели, благодаря чему
    гардеробная отличается долговечностью, удобством и аккуратным внешним видом.
    Специалисты компании МебЭстет помогут
    подобрать оптимальные материалы, цветовые решения и конфигурацию системы хранения,
    чтобы гардеробная гармонично вписалась в интерьер и стала удобным пространством для хранения вещей.
    Компания выполняет полный комплекс работ – от
    консультации и точных замеров до проектирования, изготовления и профессиональной установки гардеробной на заказ в Москве и Московской области.

    Мебель в прихожую на заказ в Москве от компании МебЭстет
    – это практичное решение
    для создания удобного и функционального пространства
    при входе в квартиру или дом с учётом индивидуальных
    размеров помещения и особенностей планировки.
    Индивидуальное изготовление позволяет разработать мебель, которая идеально вписывается в интерьер прихожей
    и эффективно использует доступное пространство, включая
    ниши, углы и стены. Компания МебЭстет изготавливает шкафы в
    прихожую, встроенные системы хранения,
    тумбы для обуви, комоды, вешалки,
    зеркальные панели и другие элементы мебели по индивидуальным проектам.
    Продуманная конструкция мебели помогает
    удобно разместить верхнюю
    одежду, обувь, аксессуары и бытовые
    вещи, обеспечивая порядок и комфорт в
    прихожей. В производстве используются
    качественные материалы, надёжная фурнитура и современные
    технологии изготовления мебели, что
    обеспечивает долговечность, прочность и аккуратный внешний вид изделий.
    Специалисты компании помогают подобрать
    оптимальные материалы, цветовые решения
    и внутреннее наполнение мебели, чтобы она гармонично вписалась в интерьер и
    максимально эффективно использовала пространство.

    Компания МебЭстет выполняет полный цикл
    работ – от консультации и точных замеров до разработки проекта, производства и профессиональной установки мебели в прихожую на заказ в Москве и Московской
    области.

    встроенные шкафы на заказ

  11. Justinmub's avatar Justinmub says:

    Generic Viagra online: Cheap Viagra 100mg – CoreBlue Health

  12. LamarBlick's avatar LamarBlick says:

    best online pharmacy reddit CivicMeds canadian pharmacy cheap

  13. Justinmub's avatar Justinmub says:

    pharmacy wholesalers canada: canadian pharmacy discount coupon – order pharmacy online egypt

  14. JamesAlano's avatar JamesAlano says:

    http://corebluehealth.com/# Buy Viagra online cheap

  15. That is a very good tip especially to those new to the blogosphere. Short but very accurate information… Many thanks for sharing this one. A must read article!

  16. CharlesWhexy's avatar CharlesWhexy says:

    The aroma of this terpene blend – strawberry cough drops is at bottom clean and ingenuous, not too tireless but still clear in the overcome way. It blends smoothly and adds a much bettor flavor diagram without overpowering the aggregate else. Flush a close amount makes a balance, which says a plight about the quality. The packaging was solid, shipping was fast, and the sound adventure felt reliable. Unquestionably decent product and one I’d cheerfully order again.

  17. IsmaelNiz's avatar IsmaelNiz says:

    Good post. I learn something new and challenging on blogs I stumbleupon everyday. It’s always useful to read content from other authors and use something from their web sites.
    https://teletype.in/@avtobloggerua/yBdxoskAM8B

  18. BrianLYDAY's avatar BrianLYDAY says:

    prednisone 50 mg buy: buy prednisone online usa – prednisone buy canada

  19. Rodneyimpah's avatar Rodneyimpah says:

    These are indubitably some of the best gummy indica around. The weave was pliable, the flavor tasted advantage, and there wasn’t any weird aftertaste left behind. They felt like a countless daytime alternative, first recompense moments when a more upbeat vibe made sense. The serving size was also simple and straightforward, which мейд them tranquilly to ply into a routine. They also right absolutely clearly into the drive gummies category because the total quality was bright, beacon, and enjoyable.

  20. EarnestCor's avatar EarnestCor says:

    Nice post. I learn something totally new and challenging on websites I stumbleupon on a daily basis. It’s always helpful to read through articles from other writers and practice something from their websites.
    Timothy Malmros Genach

  21. kiwi strain's avatar kiwi strain says:

    The hint of this terpene blend – pinene terpene is exceedingly good and ingenuous, not too tireless but motionless clear in the superlative way. It blends smoothly and adds a much beat flavor profile without compelling the aggregate else. Even a elfin amount makes a difference, which says a lot about the quality. The packaging was secure, shipping was faithful, and the mainly happening felt reliable. Actually congested spin-off and one I’d joyfully order again.

  22. Fobertnap's avatar Fobertnap says:

    Hey! This is my first comment here so I just wanted to give a quick shout out and tell you I really enjoy reading through your blog posts. Can you recommend any other blogs/websites/forums that cover the same subjects? Many thanks!
    https://mostbet-zerkaloonline.buzz/en/demo-the-dog-house/

  23. mood gummies's avatar mood gummies says:

    The CBD store – mood gummies offers a multifariousness of formats that suit other preferences, and each a certain feels grandly executed. The unguent appears dry-clean and in conformance, the packaging materials sensible of sturdy, and the design is unostentatious till elegant. The products are quiet to store and fraternize with, thanks to secure lids and thick sizing. Entire, the label delivers a outstanding and carefully crafted test without dispensable extras.

  24. famous athletes who used steroids

    References:
    bookmarkfeeds.stream

  25. is short term prednisone use dangerous

    References:
    links.senc.in

  26. MarioNet's avatar MarioNet says:

    Продуманный внешний вид играет значимую роль в формировании образа.
    Она помогает подчеркнуть индивидуальность и почувствовать уверенность.
    Современный внешний вид влияет на то, как человека видят в обществе.
    В повседневной жизни одежда может добавлять уверенности.
    https://fb.elfnon.com/post/766_lepodium-%D0%BB%D1%8E%D0%BA%D1%81-%D0%B1%D1%80%D0%B5%D0%BD%D0%B4%D1%8B-%D1%81-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%BE%D0%B9-%D0%BF%D0%BE-%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B8-%D0%BD%D0%B5%D1%81%D0%BC%D0%BE%D1%82%D1%8
    Стильный образ облегчает общение.
    При этом важно учитывать индивидуальные особенности и контекст.
    Мода дают возможность находить новые решения.
    В целом, умение стильно одеваться помогает чувствовать себя уверенно.

  27. EarnestCor's avatar EarnestCor says:

    whoah this blog is great i love reading your posts. Stay up the great work! You recognize, many persons are looking round for this information, you could aid them greatly.
    buy viagra sexual porno xxx adults pills

  28. After exploring a few of the blog articles on your site, I seriously like your technique of blogging. I book-marked it to my bookmark webpage list and will be checking back soon. Take a look at my website as well and let me know what you think.

  29. 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?

  30. Malcolmmomma's avatar Malcolmmomma says:

    Real-money gaming platforms have become incredibly widespread due to their sheer convenience.
    Users can enjoy their preferred titles at any time and anywhere with an online connection.
    The excitement of playing for actual cash introduces an extra layer of engagement.
    A vast selection of choices caters to every taste and skill level.
    Promotions and loyalty programs provide added incentives to keep participants coming back.
    Modern sites ensure secure transactions and regulated gameplay.
    ice fishing

  31. Изготовление шкафов на заказ в Москве от компании МебЭстет –
    это возможность получить качественную и функциональную мебель, идеально подходящую под размеры помещения и
    особенности интерьера. Индивидуальное проектирование позволяет создать шкафы, которые точно вписываются в
    пространство квартиры, дома или офиса,
    учитывая планировку комнаты,
    высоту потолков, ниши и другие архитектурные особенности.
    Компания МебЭстет изготавливает распашные шкафы,
    встроенные шкафы, шкафы-купе и современные
    гардеробные системы по индивидуальным проектам, что позволяет максимально
    эффективно использовать пространство и организовать удобную систему хранения.
    В производстве применяются качественные материалы, надёжная фурнитура и современные технологии, обеспечивающие прочность,
    долговечность и аккуратный внешний
    вид мебели. Специалисты компании
    помогают подобрать оптимальные материалы,
    цветовые решения и внутреннее наполнение шкафов – полки, выдвижные ящики, штанги для одежды и дополнительные системы хранения.
    Заказывая изготовление шкафов по индивидуальным размерам,
    вы получаете мебель, которая гармонично вписывается в интерьер, делает пространство более организованным и комфортным.

    Компания МебЭстет выполняет полный цикл работ – от
    консультации и замеров до производства и профессиональной установки шкафов на заказ в Москве
    и Московской области.

    заказать мебель

  32. Shawnswarp's avatar Shawnswarp says:

    Looking stylish creates a strong first impression.
    A attire speaks loudly before you even speak a single word.
    It boosts your own self-esteem and mood significantly.
    Your polished appearance conveys professionalism in the workplace.
    https://techlover.modavmode.ru/ustoychivost-i-ekologichnost-v-proizvodstve-guerlain-8629647/
    Fashionable choices allow you to express your unique identity.
    People often judge well-dressed people as more successful and reliable.
    Therefore, investing in your wardrobe is an investment in your personal brand.

  33. 66jllogin's avatar 66jllogin says:

    Anyone having trouble logging in? Just used 66jllogin and it was smooth sailing. Hope you guys are having some good luck!

  34. mnl63 login's avatar mnl63 login says:

    MNL63 login works perfectly! Logging in was seamless. Hope the wins roll in! Easy access: mnl63 login

  35. mnl63 ph's avatar mnl63 ph says:

    MNL63 PH, is it legit for us here in Philippines? Saw some ads earlier. Let’s try it out for fun. Here’s the link: mnl63 ph

  36. betflix969's avatar betflix969 says:

    ข้อมูลชุดนี้ มีประโยชน์มาก ครับ
    ดิฉัน ได้อ่านบทความที่เกี่ยวข้องกับ เรื่องที่เกี่ยวข้อง
    สามารถอ่านได้ที่ betflix969
    ลองแวะไปดู
    เพราะอธิบายไว้ละเอียด
    ขอบคุณที่แชร์ เนื้อหาดีๆ นี้
    และอยากเห็นบทความดีๆ แบบนี้อีก

  37. Shawnswarp's avatar Shawnswarp says:

    Looking well projects a positive first impression.
    Your outfit communicates loudly before you actually speak a single word.
    This boosts your own self-esteem and mindset noticeably.
    A polished appearance conveys competence in the office.
    https://blog.mixwatch.ru/obuv-loro-piana-masterstvo-i-vnimanie-k-detalyam-2172480/
    Fashionable clothing let you to express your individual identity.
    People often judge stylish people as more successful and trustworthy.
    Therefore, investing in your wardrobe is an valuable step in yourself.

  38. Shawnswarp's avatar Shawnswarp says:

    Looking well projects a strong first impression.
    A outfit speaks loudly before you actually speak a word.
    This boosts your own self-esteem and mood significantly.
    A polished look signals competence in the office.
    https://musiccode.meatmoda.ru/muzhskaya-liniya-odezhdy-jacquemus-sovremennost-i-elegantnost-v-kazhdom-shve-8724265/
    Stylish clothing let you to express your individual personality.
    Others often perceive well-dressed individuals as more capable and reliable.
    Therefore, investing in your style is an valuable step in yourself.

  39. EarnestCor's avatar EarnestCor says:

    Howdy terrific website! Does running a blog similar to this take a massive amount work? I’ve virtually no understanding of programming but I was hoping to start my own blog in the near future. Anyhow, if you have any ideas or tips for new blog owners please share. I know this is off subject but I just wanted to ask. Kudos!
    https://drive.google.com/file/d/16eHi1mpXSLdP0l4wbSpHWRlCnelDJ5It/view?usp=sharing

  40. LindsayEduts's avatar LindsayEduts says:

    Сваи играют важнейшую функцию в строительстве прочного фундамента.
    Данные конструкции дают возможность правильно распределить нагрузку от здания на грунт.
    Применение свай особенно актуально на проблемных грунтах с большим уровнем грунтовых вод.
    Такой фундамент обеспечивает стабильность конструкции при подвижках земли.
    https://log.concept2.com/profile/2869487
    Свайное основание способно переносить значительные нагрузки в том числе в сейсмоопасных районах.
    Кроме того, подобный фундамент требует минимальный количество подготовительных мероприятий.
    В итоге, грамотный монтаж конструкций обеспечивает длительный срок службы всего сооружения.

  41. LindsayEduts's avatar LindsayEduts says:

    Сваи выполняют важнейшую роль в возведении прочного фундамента.
    Они позволяют равномерно передать нагрузку от постройки на почву.
    Применение стержней крайне актуально на слабых грунтах с большим уровнем влаги.
    Такой тип опор обеспечивает устойчивость строения при подвижках земли.
    https://bookmark-template.com/story27974844/%D0%A1%D1%83%D0%B2%D0%BE%D1%80%D0%BE%D0%B2%D1%81%D0%BA%D0%B8%D0%B5-%D0%A1%D0%B2%D0%B0%D0%B8
    Опорное решение способно выдерживать значительные воздействия даже в сложных районах.
    Кроме того, подобный вариант требует меньше объём подготовительных мероприятий.
    Таким образом, грамотный выбор конструкций гарантирует долговечность всего объекта.

  42. KevinJag's avatar KevinJag says:

    Apologies for dropping this here, but this point is still worth making. Health is never really separate from everyday living, and it has a lot to do with how the body and mind get through the day. The problem is that health advice is everywhere now, but constant input often makes it harder to see what matters. That tends to happen when broad advice stands in for deeper explanation, which makes broad advice seem more complete than it really is. That is where confusion often starts, because baseline differences shape every outcome. At that point, physical and mental signals often begin to surface, through signs like tension, restlessness, and uneven concentration. That is why careful observation is usually the better first move, following trends instead of isolated events, so that the response fits the actual situation. That is why a thoughtful health discussion can be so useful, because it lets the discussion stay thoughtful and practical at the same time. So if you want a more complete picture instead of fragments, it is worth taking a closer look at does sildenafil expire.

  43. KevinJag's avatar KevinJag says:

    Sorry if this is slightly off topic, but it probably fits here better than anywhere else. Health plays a role in everyday life whether we focus on it or not, and it has a lot to do with how the body and mind get through the day. The issue is the sheer amount of health content people now see, but constant input often makes it harder to see what matters. This often starts when health topics get reduced to quick summaries, so broad recommendations begin to look like fixed rules. That is where confusion often starts, because personal context changes the meaning of advice. So what happens next is usually pretty familiar, through body signals that are easy to dismiss at first. That is why real progress usually starts with attention, reading the pattern before jumping to conclusions, so that action follows insight instead of urgency. That is also why this topic deserves more than quick advice, because it allows a topic to be explained with more balance and depth. So if you want something more thoughtful than standard advice, one topic that helps tie these ideas together is doxycycline for dogs.

  44. India's avatar India says:

    ข้อมูลชุดนี้ อ่านแล้วเพลินและได้สาระ ค่ะ
    ผม ไปเจอรายละเอียดของ เนื้อหาในแนวเดียวกัน
    ซึ่งอยู่ที่ India
    สำหรับใครกำลังหาเนื้อหาแบบนี้
    เพราะอธิบายไว้ละเอียด
    ขอบคุณที่แชร์ ข้อมูลที่มีประโยชน์ นี้
    และอยากเห็นบทความดีๆ แบบนี้อีก

Leave a Reply

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