Example #1
0
 public Repository(IMongoDbContext mongoDbContext)
 {
     _mongoDbContext = mongoDbContext;
     _database       = mongoDbContext.GetConnection();
 }
Example #2
0
        public IEnumerable <string> Get()
        {
            var conn = _context.GetConnection();

            return(new string[] { "value1", "value2", _user.IsAuthenticated().ToString() });
        }
Example #3
0
 public Repository(IMongoDbContext context)
 {
     _context         = context;
     database         = _context.GetConnection();
     collectionEntity = database.GetCollection <T>(typeof(T).Name);
 }