public PostController() { _context = new SportboardDbContext(); _unitOfWork = new UnitOfWork(_context); _postRepository = new PostRepository(_context); _feedRepository = new FeedRepository(_context); }
public UserNotificationController() { _context = new SportboardDbContext(); _unitOfWork = new UnitOfWork(_context); _userNotificationRepository = new UserNotificationRepository(_context); _bLLUserNotif = new BLLUserNotifications(_unitOfWork, _userNotificationRepository); }
public AdminController() { _context = new ApplicationDbContext(); _dbContext = new SportboardDbContext(); _unitOfWork = new UnitOfWork(_dbContext); _requestRepository = new DeletionRequestRepository(_dbContext); }
public void GetUserHistory(string id) { using (var context = new SportboardDbContext()) { _feeds = context.Feed .Include("Image") .Where(f => f.UserId == id) .OrderByDescending(f => f.CreatedOn) .ToList(); _posts = context.Post .Include("Feed") .Include("Image") .Where(p => p.UserId == id) .OrderByDescending(p => p.PostDate) .ToList(); _comments = context.Comment .Include("Post") .Include("CommentUpvoteUserIds") .Include("CommentDownVoteUserIds") .Where(c => c.UserId == id) .OrderByDescending(c => c.CreatedOn) .ToList(); } }
public CommentController() { _context = new SportboardDbContext(); _unitOfWork = new UnitOfWork(_context); _postRepository = new PostRepository(_context); _commentRepository = new CommentRepository(_context); _userRepository = new UserRepository(_context); }
public ManageController() { _context = new SportboardDbContext(); _uow = new UnitOfWork(_context); _userPreferenceRepository = new UserPreferenceRepository(_context); _userRepository = new UserRepository(_context); _imageRepository = new ImageRepository(_context); _deletionRequestRepository = new DeletionRequestRepository(_context); }
public FeedController() { _context = new SportboardDbContext(); _unitOfWork = new UnitOfWork(_context); _imageRepository = new ImageRepository(_context); _feedRepository = new FeedRepository(_context); _postRepository = new PostRepository(_context); _userPreferenceRepository = new UserPreferenceRepository(_context); _userRepository = new UserRepository(_context); _deletionRequestRepository = new DeletionRequestRepository(_context); }
public ValidPostConstraint() { _context = new SportboardDbContext(); _postRepository = new PostRepository(_context); }
public CommentController() { _context = new SportboardDbContext(); _commentRepository = new CommentRepository(_context); }
public ImageRepository(SportboardDbContext context) : base(context) { }
public CommentRepository(SportboardDbContext context) : base(context) { }
public UserPreferenceRepository(SportboardDbContext context) : base(context) { }
public PostRepository(SportboardDbContext context) : base(context) { }
public UserNotificationRepository(SportboardDbContext context) : base(context) { }
public FeedRepository(SportboardDbContext context) : base(context) { }
public ValidFeedConstraint() { _context = new SportboardDbContext(); _feedRepository = new FeedRepository(_context); }
public DeletionRequestRepository(SportboardDbContext context) : base(context) { }
public Repository(SportboardDbContext context) { Context = context; _dbSet = Context.Set <TEntity>(); }
public UserRepository(SportboardDbContext context) : base(context) { }