Last active
October 16, 2017 13:44
-
-
Save fasetto/5f885e768e0f355a885c81193b64316c 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
public abstract class MongoRepository<TEntity> : IRepository<TEntity> | |
where TEntity : EntityBase | |
{ | |
protected abstract IMongoCollection<TEntity> Collection { get; } | |
public MongoRepository(MongoDataContext dataContext) | |
{ | |
} | |
public virtual async Task AddNewAsync(TEntity entity) | |
{ | |
await Collection.InsertOneAsync(entity); | |
} | |
// [..] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment