Vixen
caa30e12
csharp
public interface IGuildRepository

Guilds. Doc 27 § Persistence, and the half that waited for IGuildGrain.

Read the guide page for this →

Remarks

§ Persistence names this interface and L3 slice one deferred it, with the reason written down: "a repository's single-writer discipline comes from the grain that owns the aggregate ... A repository with no owner would be a table anything may write, which is the one thing this layer exists to prevent. It lands with the grain." The grain landed.

Methods (4)

  • Task<GuildRow?> ReadAsync(Guid id, CancellationToken cancellation)

    Reads a guild.

  • Task<IReadOnlyList<GuildRow>> ForAccountAsync(Guid account, CancellationToken cancellation)

    Every guild an account has a character in — the list a character screen shows.

  • Task<WriteOutcome> WriteAsync(GuildRow row, CancellationToken cancellation)

    Writes a guild, if nobody else has written it since.

  • Task<bool> DeleteAsync(Guid id, CancellationToken cancellation)

    Forgets a guild that has ended.

Used by (5)

  • GuildRepositoryTestsVixen.Live.Persistence.Tests
  • IPersistenceVixen.Live.Persistence
  • MemoryPersistenceVixen.Live.Persistence
  • SqlPersistenceVixen.Live.Persistence
  • SqlPersistenceTestsVixen.Live.Persistence.Tests