IRepository Interface
Defines the repository pattern for an Entity.
graph BT Type["IRepository"] class Type type-node

Syntax

public interface IRepository

Remarks

Based on the NBlog repository by Chris Fulstow [https://github.com/ChrisFulstow/NBlog/blob/master/NBlog.Web/Application/Storage/IRepository.cs]

Methods

Name Return Value Summary
DeleteEntity<TEntity>(object) void
Deletes the entity.
HasEntity<TEntity>(object) bool
Determines whether the specified key has entity.
LoadAll<TEntity>() IEnumerable<TEntity>
Loads all.
LoadSingle<TEntity>(object) TEntity
Loads the single.
SaveEntity<TEntity>(TEntity) void
Saves the entity.

Extension Methods

Name Value Summary
IsAssignableToISerializable<IRepository>() bool
Determines whether the specified type can be assigned to System.Runtime.Serialization.ISerializable.
ToObjectOrDbNull<IRepository>() object
Boxes the nullable in object or returns DBNull.
ToReferenceTypeValueOrThrow<IRepository>(string) T
Returns the non-null value of the specified, nullable reference type or throws an ArgumentNullException when the value is null.