Skip to content

Instantly share code, notes, and snippets.

@fasetto
Created October 16, 2017 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fasetto/66a5e9d52d96f492af60a840ab8cab38 to your computer and use it in GitHub Desktop.
Save fasetto/66a5e9d52d96f492af60a840ab8cab38 to your computer and use it in GitHub Desktop.
public interface IRepository<TEntity> where TEntity : EntityBase
{
Task AddNewAsync(TEntity entity);
Task<bool> UpdateAsync(ObjectId id, string field, string value);
Task<TEntity> GetByIdAsync(ObjectId id);
Task<IEnumerable<TEntity>> GetByFieldAsync(string field, string value);
Task<long> DeleteAllAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment