Created
June 16, 2011 14:59
-
-
Save aidanmorgan/1029417 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace WhiskeyRecommender.Persistence | |
{ | |
/// <summary> | |
/// Simple base interface that defines standard operations that are performed by all repositories in the system. | |
/// </summary> | |
public interface IRepository<T> | |
{ | |
/// <summary> | |
/// Returns an instance of <c>T</c> that has the provided id. | |
/// </summary> | |
T FindById(Guid id); | |
/// <summary> | |
/// Returns a <see cref="IQueryable"/> that allows querying all instances of type <c>T</c>. | |
/// </summary> | |
/// <returns></returns> | |
IQueryable<T> All(); | |
/// <summary> | |
/// Returns all <c>T</c> that match the provided criteria. | |
/// </summary> | |
IQueryable<T> Query(Expression<Func<T, bool>> criteria); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment