Files
SVSimServer/SVSim.EmulatedEntrypoint/Services/IViewerMissionStateService.cs
gamer147 c9534d8fac feat(missions): ViewerMissionStateService — lazy materialize achievements + assign slots
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>
2026-05-27 10:29:30 -04:00

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);
}