The SubCategory repository uses raw ADO.NET via NpgsqlDataSource and NpgsqlCommand with parameterized queries to prevent SQL injection. This provides full control over the SQL being executed. Request Flow How Parameterized Queries Work The database engine receives the SQL structure and parameter values independently, making it impossible to inject malicious SQL. Transaction / Commit / Rollback Pattern For operations that need atomicity (multiple statements that must all succeed or all fail), use explicit transactions: Repository Implementation Key ADO.NET Features Feature Purpose NpgsqlDataSource Connection pool managed by Npgsql (registered as Singleton) Parameters.AddWithValue() Parameterized queries preventing SQL injection RETURNING clause Retrieves server-generated values in the…