GitHub Copilot works but your architecture pays the price


Hey friend,

I just released a new video and wanted to share it with you.

โ€‹Watch the video here ๐Ÿ‘‡

video previewโ€‹

I used GitHub Copilot to build a small Blazor weather app. It worked almost instantly and even used real API calls. At first glance, everything looked great.

Then I opened the Razor file.

All the logic was sitting in one place. UI, API calls, and business logic mixed together. It worked, but it was not something I would ship.

In the video, I show how I fix this using a single refactoring prompt. I move the logic out of the Razor component and restructure the app using Vertical Slice Architecture with feature folders, CQRS, and Mediator. The behavior stays the same, but the code becomes clean and maintainable.

If you want to see how to use Copilot for real Blazor apps without losing control of your architecture, this one is worth watching.

Take care,

Patrick

P.S. If you want to learn how to use AI as a real coding partner and not just a code generator, check out my new course .NET Web Development with AI and Copilot. Click here to join, and use the code NEWSLETTER for a discount.


Patrick God

Become a .NET & Blazor expert with weekly tutorials featuring best practices and the latest improvements, right in your inbox.

Read more from Patrick God

Hey friend, Blazor Server or WebAssembly? Lately, I had a call with a student migrating a desktop appโ€ฆ and this question came up immediately. So I made a quick video to break it down: You'll learn: When Blazor Server is the simplest choice When you actually need WebAssembly And when an API becomes necessary Enjoy! Take care,Patrick P.S. Our next live office hours inside the .NET Web Academy start tomorrow. Join here.

video preview

Hey friend, Working from home as a .NET developer sounds great. Freedom. No meetings. Full control. But after a while, it gets heavy. You make every decision alone. Architecture. Azure. Refactoring. Deployment. And sometimes you just want someone to say, โ€œYeah, thatโ€™s fine. Ship it.โ€ AI helps. Tutorials help. But real conversations with other developers hit different. In today's video, I talk about why working alone can slow us down and why feedback from other devs matters more than we think....

video preview

Hey friend, Quick one today. GitHub Copilot makes form validation feel easy. But if you are not careful, it slowly decides where your logic lives. Your app still works. But the structure gets worse. In today's video, I show you: A simple Blazor register form How Copilot refactors it the wrong way How to move validation out cleanly How to guide Copilot with clear rules Watch the video here ๐Ÿ‘‡ Have a great start to the new year! ๐ŸŽ† Take care, Patrick P.S. If you want to learn how to use AI as a...