Table of Contents

Interface IRepositoryService<TEntity>

Namespace
BSGameLib.Server
Assembly
BSGameLib.Server.dll

Loads and saves entities of type TEntity by id. The server injects it into the game's code.

public interface IRepositoryService<TEntity> : IInjectedDependency

Type Parameters

TEntity

Properties

All

Every entity.

IReadOnlyCollection<TEntity> All { get; }

Property Value

IReadOnlyCollection<TEntity>

Methods

Exists(long)

Whether an entity with id exists.

bool Exists(long id)

Parameters

id long

Returns

bool

GetById(long)

Returns the entity with id.

TEntity GetById(long id)

Parameters

id long

Returns

TEntity

Save(TEntity)

Saves entity, creating or updating it.

void Save(TEntity entity)

Parameters

entity TEntity