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
idlong
Returns
GetById(long)
Returns the entity with id.
TEntity GetById(long id)
Parameters
idlong
Returns
- TEntity
Save(TEntity)
Saves entity, creating or updating it.
void Save(TEntity entity)
Parameters
entityTEntity