DEV Community

Cover image for Build a Food-Ordering Chatbot in 30 Minutes by .NET 10 and Azure
Duc Nguyen Thanh
Duc Nguyen Thanh

Posted on

Build a Food-Ordering Chatbot in 30 Minutes by .NET 10 and Azure

Hey there, buddy!
Ever dreamed of having your own chatbot that can take food orders faster than you can say "cheeseburger with extra pickles"?
Well, buckle up because I’m about to show you how to get a fully functional food-ordering bot up and running in just 30 minutes!

Let’s go! 🍟

What You’ll Get Out of This

By the end of this guide, you’ll have a chatbot that can handle these three tasty scenarios:

  • Ordering something straight from the menu (like a cheeseburger combo—yum!).
  • Asking for the menu but ordering something that’s not there (sorry, no sushi here, but the bot will help you out!).
  • Canceling an order and starting fresh (because sometimes you change your mind mid-order). Ready? Let’s roll! 🚀

Step 1: Clone the DineBot Repo (5 Minutes)

First things first, let’s grab my project from GitHub.
I’ve already done the heavy lifting for you, so all you need to do is clone my repo

git clone https://github.com/ngtduc693/DineBot.git
cd DineBot
Enter fullscreen mode Exit fullscreen mode

Make sure you’ve got .NET 10.0 SDK installed. This bot is built with .NET 10, so it’s a must-have

Step 2: Test Your Bot with Bot Framework Emulator (10 Minutes)

Let’s get this bot chatting using the Bot Framework Emulator—a super handy tool to test bots locally. It’s like having a mini restaurant right on your laptop!

Install the Emulator: Download the Bot Framework Emulator here. Pick the latest version for your OS (Windows, Mac, or Linux).
Install it and fire it up. It’s as easy as installing a game—click, click, done!

Back in your terminal, inside the DineBot folder, run:

dotnet run
Enter fullscreen mode Exit fullscreen mode

You’ll see some magic happen in the terminal, and the bot will start listening at http://localhost:3978/api/messages. Keep this URL handy—it’s where your bot lives!

Food Bot

Connect the Emulator to Your Bot: Open Bot Framework Emulator and click Open Bot then paste the URL: http://localhost:3978/api/messages

Emulator

Step 3: Let’s Chat and deploy to Azure AI Services (15 Minutes)

  • Upload the training model from TrainingModel here then deploy it to Azure Language Understanding

Azure LUIS

"LanguageUnderstanding": {
    "Endpoint": "",
    "Key": "",
    "ProjectName": "Food",
    "DeploymentName": ""
  }
Enter fullscreen mode Exit fullscreen mode

OK! Let's chat

  • Scenario 1: Ordering Something on the Menu
  • Scenario 2: Asking for the Menu but Ordering Something Not Available
  • Scenario 3: Canceling an Order and Starting Fresh

Top comments (3)

Collapse
 
ngtduc693 profile image
Duc Nguyen Thanh

Feel free to ask me 🚀

Collapse
 
shlok-talepa profile image
Shlok Talepa

So much detailed guide, nice piece of content btw

Collapse
 
ngtduc693 profile image
Duc Nguyen Thanh

thanks