Skip to content
Generic base interfaces needed for implementing a very basic repository pattern in your project.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
RepositoryPattern
.gitignore
LICENSE.txt
README.md
RepositoryPattern.sln
icon.png

README.md

NuGet

The Repository Pattern


These are the generic base interfaces needed for implementing a very basic repository pattern inside your C# projects.

Repositories (IRepository<T1, in T2>) always contain objects that implement IEntity<T> (where T is the type of unique identifier). Usually, T would be something like string or int...

Make absolutely sure that your implementation guarantees the uniqueness and immutability of every IEntity<T>.Id!

Existing implementations

The following are official (or officially tested) implementations:

You can’t perform that action at this time.