// code-maze-ai
Stuck on a design pattern, a LINQ query, or a compiler error you can't place? Ask Code Maze AI right inside the lesson. It answers from the course you're taking — in the course's own voice, not the whole internet's.
14 days free · then $4.99/mo
Free questions in every course · no card charged for 14 days · cancel anytime.
// the problem
Ask ChatGPT and it may invent an API that doesn't exist or hand you advice from three .NET versions ago. You can't tell until it fails to compile.
Every time you leave the lesson to search, you lose your place — and your momentum. The answer rarely maps back to what you were just reading.
Reference docs tell you what a method does. They don't tell you how it applies to the exercise in front of you, right now.
// what it is
Code Maze AI is grounded in the lessons you're studying. Every answer is drawn from the course material, so it matches what you're being taught — the same patterns, the same conventions, the same examples you're working through.
Generic AI
Code Maze AI
> How do I read the JSON request body in a Minimal API endpoint?
Generic AI
Read it from the stream and deserialize it yourself:
using var reader = new StreamReader(context.Request.Body);
var body = await reader.ReadToEndAsync();
var order = JsonConvert.DeserializeObject<Order>(body);
Reaches for Newtonsoft and manual stream reading — not how modern Minimal APIs work.
Code Maze AI
Bind the body straight to a parameter — Minimal APIs deserialize it for you:
app.MapPost("/orders", (Order order) =>
Results.Ok(order));
The order parameter is populated from the JSON body automatically, via System.Text.Json.
// see it in action
Real questions, answered from the course — it teaches you the why, then points you back to the exact lesson.
> CS0246: the type or namespace name 'DbContext' could not be found — what am I missing?
That error means the compiler can't see the type — almost always a missing using or an uninstalled package. DbContext lives in EF Core, so add:
using Microsoft.EntityFrameworkCore;
If it still won't resolve, the Microsoft.EntityFrameworkCore package isn't installed yet — we add it right at the start of the setup lesson.
> can you review this repository method?
public List<Product> GetAll()
{
var db = new AppDbContext();
return db.Products.ToList();
}
Two things, measured against how the course does it:
1. Don't new up the context. Inject AppDbContext through the constructor — the course registers it with DI in the dependency-injection lesson. Newing it here bypasses that and can leak connections.
2. Make it async. Use ToListAsync() and return Task<List<Product>> so you're not blocking a thread on database I/O.
> IEnumerable vs IQueryable — when does it actually matter?
It matters the moment a database is involved.
IEnumerable<T> filters in memory — EF pulls the rows first, then .Where() runs in C#. IQueryable<T> builds an expression tree, so .Where() becomes part of the SQL and the database does the filtering.
On a large table that's the difference between loading 10 rows and loading 10 million. Same LINQ, very different cost.
From the LINQ in EF Core lesson> wait, why does this even work?
Since you're on the Observer Pattern lesson: it works because the subject keeps a list of observers and calls each one's Update() whenever its state changes.
The observers never call the subject — they just wait to be notified. That inversion is the whole point: the subject doesn't need to know what the observers do, only that they implement IObserver.
// how it helps
The assistant sits on every lesson page. No tab-switching, no losing your place mid-exercise.
Pulled from the course you're in, so they line up with what you're actually learning.
Paste a snippet and get feedback measured against the patterns the course teaches.
"Strategy vs State?" — it pulls both lessons and explains exactly where they differ.
Ask for an example, then "now make it async" — it keeps the thread of the conversation.
2 a.m., mid-exercise, whenever the wall goes up — it's there and ready.
// getting started
Head into any lesson in a course you're enrolled in.
Find the Code Maze AI bubble in the bottom corner and open it.
Type your question and get an answer drawn from the lesson — right away.
// pricing
Every enrolled student gets a handful of free questions in each course — no card needed. Start a 14-day free trial for unlimited mentoring across your courses.
Code Maze AI
14 days free$4.99/month after trial
Manage or cancel any time from your account subscriptions page.
// questions
Any course you're enrolled in that has the mentor enabled. It answers from that specific course's lessons.
It's grounded in your course. Instead of guessing from the whole internet, it retrieves the relevant lessons and answers from them, in the course's voice — so it won't invent APIs or contradict what you're being taught.
Yes. Cancel from your account's subscriptions page in a click. You keep access until the end of the period you've already paid for.
Your questions are sent to our AI provider (Anthropic, in the US) to generate answers, and logged to improve the courses. Please don't share personal or sensitive information. See our privacy policy for details.
No — it's a study aid. It helps you get unstuck and understand faster, but the lessons and exercises are still where the learning happens.
Yes. The mentor lives inside courses you own, right on the lesson pages.
Your next "wait, how does this work?" has an answer waiting in the lesson.