namespace Bff.Api; /// /// The public view of the read projection: filters rows by the openbaar search term and maps each to /// a public-safe (only id + status — bsn/naam never leave the /// BFF). Pure so it is unit- and mutation-tested directly (ADR-0010). /// public static class OpenbaarProjection { public static IReadOnlyList PublicView(IReadOnlyList entries, string? q) { var filtered = string.IsNullOrWhiteSpace(q) ? entries : entries.Where(e => e.Id.Contains(q, StringComparison.OrdinalIgnoreCase)); return [.. filtered.Select(e => new OpenbaarEntry(e.Id, e.Status))]; } }