Five lessons, learn how to really apply AI to your .NET Applications
Generative AI for Beginners .NET - A Course
Practical lessons teaching you how to build Generative AI applications in .NET
Welcome to Generative AI for Beginners .NET, the hands-on course for .NET developers diving into the world of Generative AI!
This isn’t your typical “here’s some theory, good luck” course. This repository is all about real-world applications and live coding to empower .NET developers to take full advantage of Generative AI.
This is hands-on, practical, and designed to be fun!
Don't forget to star (🌟) this repo to find it easier later.
➡️Get your own copy by Forking this repo and find it next in your own repositories.
✨ What's New
We're constantly improving this course with the latest AI tools, models, and practical samples:
-
🤖 NEW! Microsoft Agent Framework (AgentFx) Lesson
We've added a comprehensive new lesson on the Microsoft Agent Framework - the next evolution in .NET AI development! Learn how to:
- Build orchestrated AI agent systems with specialized roles
- Create multi-model workflows combining GitHub Models, Azure AI Foundry, and Ollama
- Integrate with Model Context Protocol (MCP) for enhanced capabilities
- Design sequential and concurrent agent workflows for complex tasks
View all previous updates in our What's New archive
🚀 Introduction
Generative AI is transforming software development, and .NET is no exception. This course aims to simplify the journey by offering:
- Short 5-10 minute videos for each lesson.
- Fully functional .NET code samples you can run and explore.
- Integration with tools like GitHub Codespaces and GitHub Models for seamless setup and fast time-to-code. But if you want to run the samples locally with your own models, you can totally do that too.
You'll learn how to implement Generative AI into .NET projects, from basic text generation to building full-fledged solutions using GitHub Models, Azure OpenAI Services and local models with Ollama.
📦 Each Lesson Includes
- Short Video: A quick overview of the lesson (5-10 minutes).
- Complete Code Samples: Fully functional and ready to run.
- Step-by-Step Guidance: Simple instructions to help you learn and implement the concepts.
- Deep Dive References: This course focuses on the practical implementation of GenAI, to get deeper into the theoretical we also provide links to explanations in Generative AI for Beginners - A Course when needed.
🗃️ Lessons
| # | Lesson Link | Description | | --- | --- | --- | | 01 | Intro to Generative AI Basics for .NET Developers |
- Overview of generative models and their applications in .NET
- Using libraries like Microsoft.Extensions.AI and Semantic Kernel.
- Setup providers like GitHub Models, Azure AI Foundry, and local development like Ollama.
- Text generation and conversational flows.
- Multimodal capabilities (vision and audio).
- Agents
- Complete samples demonstrating GenAI in real-life scenarios
- Semantic search applications.
- Multiple agent applications
- Sample .NET apps generated using Generative AI tools like GitHub Copilot Agent.
- First sample: Retro Invaders retro console game 👾
- Build powerful orchestrated AI agent systems.
- Multi-model agent workflows.
- Integration with Model Context Protocol (MCP).
- Ethical considerations, bias mitigation, and secure implementations.
🌐 Multi-Language Support
| Language | Code | Link to Translated README | Last Updated | |----------------------|------|---------------------------------------------------------|--------------| | Chinese (Simplified) | zh | Chinese Translation | 2025-06-24 | | Chinese (Traditional)| tw | Chinese Translation | 2025-06-24 | | French | fr | French Translation | 2025-06-24 | | Japanese | ja | Japanese Translation | 2025-06-24 | | Korean | ko | Korean Translation | 2025-06-24 | | Portuguese | pt | Portuguese Translation | 2025-06-24 | | Spanish | es | Spanish Translation | 2025-06-24 | | German | de | German Translation | 2025-06-24 |
Note: All translations were updated to match the original content on 2025-06-24. See PR #161 for details.
🛠️ What You Need
To get started, you'll need:
-
A GitHub account (free is fine!) to fork this entire repo to your own GitHub account.
-
GitHub Codespaces enabled for instant coding environments. You can enable GitHub Codespaces in your repository settings. Learn more about GitHub Codespaces here.
-
Create your copy by Forking this repo, or use the
Fork
button at the top of this page. -
A basic understanding of .NET development. Learn more about .NET here.
And that's it.
We've designed this course to be as low-friction as possible. We make use of the following to help you get started quickly:
- Run in GitHub Codespaces: With one click, you'll get a pre-configured environment to test and explore the lessons.
- Leverage GitHub Models: Try out AI-powered demos hosted directly within this repo, we explain more in the lessons, as we go. (If you want to learn more about GitHub Models, click here)
Then when you're ready to expand we also have guides for:
- Upgrading to Azure OpenAI Services for scalable and enterprise-ready solutions.
- Using Ollama to run models locally on your hardware for enhanced privacy and control.
🤝 Want to Help?
Contributions are welcome! Here's how you can help:
-
Report issues or bugs in the repo.
-
Improve existing code samples or add new ones, fork this repo and propose some changes!
-
Suggest additional lessons or enhancements.
-
Do you have suggestions or found spelling or code errors?, create a pull request
Check the CONTRIBUTING.MD file for details on how to get involved.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🌐 Other Courses
We have a lot of other content to help your learning journey. Check out:
- Generative AI for Beginners
- Generative AI for Beginners .NET
- Generative AI with JavaScript
- Generative AI with Java
- AI for Beginners
- AI Agents for Beginners - A Course
- Data Science for Beginners
- ML for Beginners
- Cybersecurity for Beginners
- Web Dev for Beginners
- IoT for Beginners
- XR Development for Beginners
- Mastering GitHub Copilot for Paired Programming
- Mastering GitHub Copilot for C#/.NET Developers
- Choose Your Own Copilot Adventure
- Phi Cookbook: Hands-On Examples with Microsoft's Phi Models
Let's start learning Generative AI and .NET! 🚀
Getting Help
If you get stuck or have any questions about building AI apps, join:
If you have product feedback or errors while building visit: