Skip to content

Instantly share code, notes, and snippets.

@fasetto
Created October 16, 2017 13:59
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/e613b124f8b497ecb829ed4108ed954a to your computer and use it in GitHub Desktop.
Save fasetto/e613b124f8b497ecb829ed4108ed954a to your computer and use it in GitHub Desktop.
public class UserRepository : MongoRepository<User>
{
private readonly MongoDataContext _dataContext;
protected override IMongoCollection<User> Collection => _dataContext.Database.GetCollection<User>("users");
public UserRepository(MongoDataContext dataContext)
: base(dataContext)
{
_dataContext = dataContext;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment