Skip to main content

Practice ยท 1 of 3

The Only Safe Lookup

CHALLENGE
Difficulty: intermediate+25 XP

Implement FindUser: SELECT * FROM users WHERE name = @name with the caller's string bound as a parameter โ€” the engine REJECTS unparameterized WHERE clauses (like real engines punish injection). Returns "user:<name>" or "notfound". ``csharp static string FindUser(CjDb db, string name); ``

Back to lesson: Practice: Data Practice: Parameters, Mapping, Transactions