▸case-19 What is the recommended approach for passing configuration settings and database connection options into a custom DbContext class? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 I am executing a query using Dapper micro-ORM: `connection.Query<User>("SELECT * FROM Users WHERE Id = @Id", new { Id = 1 })`. How should I configure tracking or migrations for this Dapper call? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-07 My DbContext class has over 3,000 lines of code inside `OnModelCreating` setting up fluently mapped keys, relationships, and seed data for 50 entities. How should I organize these configurations cleanly? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 In my Domain-Driven Design model, `Address` consists of Street, City, and ZipCode, but it lacks an identity (Id column) and belongs directly to `Customer`. How should this be mapped in EF Core? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 I have an in-memory C# `List<string> names = new List<string> { "Alice", "Bob" };` in a console utility. Should I add `AsNoTracking()` or `Include()` before calling `Where()` on this List? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 My User entity has 40 columns including large JSON strings and BLOBs. I only need 'Id' and 'Email' for a dropdown list, but currently query `_context.Users.Where(u => u.IsActive).ToList()`. What EF Core technique reduces the payload size? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 We need reference lookup data (like order statuses and country codes) automatically inserted into the database whenever a fresh database schema is created or migrated. What EF Core mechanism handles this? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 Two concurrent web HTTP requests are trying to update the exact same account balance record in EF Core, causing last-in-wins data corruption. How should we prevent this in EF Core? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 I am writing a long-running C# background worker application using EF Core. Creating a single long-lived DbContext leads to memory bloat and stale tracked entities. What context creation pattern should I adopt? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-03 Our web API returns 50,000 product records directly to the user in a single request, causing database timeouts. We are considering loading all records into memory and slicing the C# List, but need a direct EF Core database-level solution. How should we handle this? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 I am building a test suite for my C# repository layer that uses Entity Framework Core to perform data operations. Please inspect my test setup code, highlight potential issues in how I am configuring the database context and provider for unit and integration tests, and provide a revised testing implementation with code examples. | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 I need to insert a primary order record and update customer credit points in EF Core. If updating points fails, the inserted order must be rolled back. How should this be handled? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 I am building a read-only reporting dashboard endpoint in ASP.NET Core using Entity Framework Core. My base code uses `_context.Orders.ToList()` which consumes excessive memory and tracks entities unnecessarily. How should I optimize this read-only query? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 When iterating over customers and printing their orders in a loop, EF Core executes a separate database query for every single customer's order list. How should I fix this performance problem? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 Our domain logic duplicates complex multi-clause filter logic across 12 different service files. How can we encapsulate EF Core query filter logic into modular, reusable components? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 When executing raw SQL queries via EF Core using string interpolation like `FromSqlRaw($"SELECT * FROM Users WHERE Name = '{userInput}'")`, how do we prevent SQL injection vulnerabilities? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 A developer wants to write string-based SQL statements `"SELECT * FROM Orders WHERE Status = 'Active'"` throughout the application instead of using LINQ expressions. What EF Core practice should they adhere to instead? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 We have a high-throughput API endpoint that executes the exact same complex LINQ query 10,000 times per minute with different search parameters. What feature in EF Core avoids re-parsing the expression tree on every invocation? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 We want to apply database migrations during automated CI/CD pipeline deployments to production environments without requiring the full .NET SDK to be installed on the deployment target. What EF Core feature facilitates this? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 In an ASP.NET Core dependency injection container, what lifetime scope should be configured for standard DbContext instances handling web HTTP requests? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-21 Provide a SQL script to analyze deadlocks and rebuild REINDEX CONCURRENTLY on PostgreSQL 15 database tables. Do not mention .NET or C# ORMs. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 Our lead database administrator refuses to let automated migrations execute directly against the production SQL database during deployment. What safety step should developers take before applying migrations? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |