docs(attendance): explain SetCountsAsync divergence from ExecuteUpdate path
This commit is contained in:
@@ -84,6 +84,8 @@ public class MealAttendanceService : IMealAttendanceService
|
|||||||
|
|
||||||
public async Task<AttendanceCountsDto> SetCountsAsync(DateOnly date, int adult, int youth, int kid)
|
public async Task<AttendanceCountsDto> SetCountsAsync(DateOnly date, int adult, int youth, int kid)
|
||||||
{
|
{
|
||||||
|
// Single-editor back-office path, so a tracked load + SaveChanges is fine here; no need for the
|
||||||
|
// race-safe EnsureRowAsync + ExecuteUpdateAsync pattern, which the EF InMemory test provider can't run.
|
||||||
var row = await _db.MealAttendances.FirstOrDefaultAsync(a => a.AttendanceDate == date);
|
var row = await _db.MealAttendances.FirstOrDefaultAsync(a => a.AttendanceDate == date);
|
||||||
if (row is null)
|
if (row is null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user