Introduction
What if you could build .NET applications by just... describing what you want?
Welcome to Vibe Coding — the newest shift in AI-powered software development. Coined by Andrej Karpathy, vibe coding is the art of letting AI feel out what you want to build based on your high-level intentions — not exact code.
In this post, I’ll show you how to build actual ASP.NET Core code using natural language prompts with tools like GitHub Copilot, Azure OpenAI, and Cursor. Yes, you’ll write less, build faster, and let your AI pair-programmer do the heavy lifting.
What is Vibe Coding?
“You describe what you want. The AI vibes with it. It writes the code.”
That’s the essence.
Unlike traditional autocomplete or code generation, vibe coding works more like a co-pilot that understands your goals and generates entire flows — endpoints, models, UIs, even test cases.
It’s powered by large language models (LLMs) like GPT-4-turbo, often wrapped in dev-specific tools like:
- GitHub Copilot
- Cursor (AI-powered IDE)
- Azure OpenAI + custom tools
- Qodana for AI-assisted code review
How I Built a Vibe-Coded .NET App
Let’s walk through building a Customer Feedback App using vibe coding — with .NET 10, ASP.NET Core, and Copilot.
Step 1: Define the App via Prompt
Open a new .cs file and type:
_"Create an ASP.NET Core minimal API to collect and store customer feedback in a SQL Server database. Use Entity Framework Core and include validation."
_
Copilot instantly generates:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<AppDbContext>(...);
var app = builder.Build();
app.MapPost("/feedback", async (Feedback feedback, AppDbContext db) => {
if (string.IsNullOrWhiteSpace(feedback.Text))
return Results.BadRequest("Feedback required.");
db.Feedbacks.Add(feedback);
await db.SaveChangesAsync();
return Results.Ok("Thanks!");
});
app.Run();
One prompt. One working endpoint. You just vibed into production.
Step 2: Add a GPT-Powered Summary Endpoint
Want to summarize recent feedback using GPT? Try:
"Add a GET endpoint that summarizes the last 5 feedback entries using Azure OpenAI"
Generated:
app.MapGet("/feedback/summary", async (AppDbContext db) => {
var last5 = await db.Feedbacks
.OrderByDescending(f => f.Timestamp)
.Take(5)
.ToListAsync();
var prompt = "Summarize this feedback:\n" + string.Join("\n", last5.Select(f => f.Text));
var summary = await gptClient.GetSummaryAsync(prompt);
return Results.Ok(summary);
});
Now you're not just coding — you're building intelligent features by describing your intent.
Best Practices for Vibe Coding
- Think like a designer — Describe your UX, flows, and data in prompts.
- Validate everything — AI-generated code can have bugs, bad assumptions, or security issues.
- Refactor after generation — Don’t be afraid to tweak, rename, or optimize the result.
- Avoid leaking secrets — Don’t paste full connection strings, tokens, or PII into AI prompts.
- Use your domain — Add context like models, services, or business logic in advance.
What Works Well in .NET Vibe Coding
- CRUD APIs
- DTOs & EF Core entities
- Middleware setup
- Blazor components
- Unit/integration tests
- Email or chat integrations
- Prompt-based services (like GPT or image generation)
What Doesn’t (Yet)
- Highly stateful async workflows
- Complex regex or low-level memory ops
- Performance tuning (still needs your expertise!)
- AI understanding large codebases holistically
Vibe Coding in Action: Video
[Coming soon: Watch me build a Blazor AI assistant in 10 minutes using vibe prompts!]
What’s Next?
This is just the beginning. With agentic AI and deeper IDE integrations coming soon, vibe coding could:
- Generate test data, seed scripts, and migrations
- Suggest architecture improvements
- Fix bugs before you hit Run
- Refactor your code with a single comment
- And you — the developer — become more of a system architect and conversation designer.
Conclusion
Vibe coding isn’t science fiction. It’s already changing how we build .NET apps — from writing 50% less code to shipping faster with smarter tools.
Try it. Prompt your app into existence. And enjoy the vibe.
Top comments (0)