public MongoNoteRepository(IResponseBuilderFactory responseBuilderFactory)
        {
            _responseBuilderFactory = responseBuilderFactory;
            var mongoClient   = new MongoClient("mongodb://localhost:32771");
            var mongoDatabase = mongoClient.GetDatabase("NoteStore");

            _mongoNoteCollection = mongoDatabase.GetCollection <Note>("Notes");
        }
示例#2
0
        public MongoUserRepository(IResponseBuilderFactory responseBuilderFactory)
        {
            _responseBuilderFactory = responseBuilderFactory;
            var mongoClient   = new MongoClient("mongodb://localhost:32771");
            var mongoDatabase = mongoClient.GetDatabase("UserStore");

            _mongoUserCollection = mongoDatabase.GetCollection <User>("Users");
        }
        public MongoRepository(IResponseBuilderFactory responseBuilderFactory, IDateTimeWrapper dateTimeWrapper)
        {
            _responseBuilderFactory = responseBuilderFactory;
            _dateTimeWrapper        = dateTimeWrapper;

            var mongoClient   = new MongoClient("mongodb://localhost:32771");
            var mongoDatabase = mongoClient.GetDatabase(typeof(TEntity).Name + "Store");

            _mongoCollection = mongoDatabase.GetCollection <TEntity>(typeof(TEntity).Name + "Collection");
        }
 public EditNoteController(INoteService noteService, IResponseBuilderFactory responseBuilderFactory)
 {
     _noteService            = noteService;
     _responseBuilderFactory = responseBuilderFactory;
 }
示例#5
0
 public NoteService(IRepository <Module7API.Dal.Model.Note> noteRepository, IResponseBuilderFactory responseBuilderFactory)
 {
     _noteRepository         = noteRepository;
     _responseBuilderFactory = responseBuilderFactory;
 }
示例#6
0
 public UserRepository(IResponseBuilderFactory responseBuilderFactory)
 {
     _responseBuilderFactory = responseBuilderFactory;
 }
示例#7
0
 public NoteRepository(IResponseBuilderFactory responseBuilderFactory)
 {
     _responseBuilderFactory = responseBuilderFactory;
 }
示例#8
0
 public UserService(IResponseBuilderFactory responseBuilderFactory, IRepository <Dal.Model.User> userRepository)
 {
     _responseBuilderFactory = responseBuilderFactory;
     _userRepository         = userRepository;
 }
 public LoginController(IUserService userService, ILoginService loginService, IResponseBuilderFactory responseBuilderFactory)
 {
     _userService            = userService;
     _loginService           = loginService;
     _responseBuilderFactory = responseBuilderFactory;
 }