Reads existing state from DB on each call (don't trust navigation property — caller may pass it stale or double-tracked). Adds via DbSet only, not via navigation property, to avoid EF double-tracking. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 lines
391 B
C#
13 lines
391 B
C#
using SVSim.Database.Models;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Services;
|
|
|
|
/// <summary>
|
|
/// Lazy-initializes viewer mission/achievement state. Idempotent. Called from
|
|
/// LoadController on every /load/index and as belt-and-braces from /mission/info.
|
|
/// </summary>
|
|
public interface IViewerMissionStateService
|
|
{
|
|
Task EnsureCurrentAsync(Viewer viewer, CancellationToken ct = default);
|
|
}
|