public SubmissionService()
        {
            UnpopularOpinionsDbContext currentContext = new UnpopularOpinionsDbContext();

            this._submissionRepository = new SubmissionRepository(currentContext);
            this._userRepository       = new UserRepository(currentContext);
            this._commentRepository    = new CommentRepository(currentContext);
        }
Exemple #2
0
        public UserService()
        {
            UnpopularOpinionsDbContext _dbContext = new UnpopularOpinionsDbContext();

            _userRepository       = new UserRepository(_dbContext);
            _commentRepository    = new CommentRepository(_dbContext);
            _submissionRepository = new SubmissionRepository(_dbContext);
        }
        public VoteService()
        {
            UnpopularOpinionsDbContext dbContext = new UnpopularOpinionsDbContext();

            this._voteRepository = new VoteRepository(dbContext);
        }
Exemple #4
0
 public SubmissionRepository(UnpopularOpinionsDbContext dbContext)
 {
     this._dbContext         = dbContext;
     this._commentRepository = new CommentRepository(dbContext);
 }
 public VoteRepository(UnpopularOpinionsDbContext dbContext)
 {
     this._dbContext = dbContext;
 }
Exemple #6
0
 public CommentRepository(UnpopularOpinionsDbContext dbContext)
 {
     this._dbContext = dbContext;
 }