Ejemplo n.º 1
0
 public void TestInitialize()
 {
     mockFollowing = new Mock <DbSet <Following> >();
     _mockContext  = new Mock <IApplicationDbContext>();
     _mockContext.SetupGet(r => r.Following).Returns(() => mockFollowing.Object);
     _followingRepository = new FollowingRepository(_mockContext.Object);
 }
Ejemplo n.º 2
0
 public UnitOfWork(GigHubContext context)
 {
     _context    = context;
     Gigs        = new GigRepository(context);
     Attendances = new AttendanceRepository(context);
     Followings  = new FollowingRepository(context);
     Genres      = new GenreRepository(context);
 }
Ejemplo n.º 3
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context    = context;
     Tours       = new TourRepository(context);
     Attendences = new AttendenceRepository(context);
     Followings  = new FollowingRepository(context);
     Genres      = new GenreRepository(context);
 }
Ejemplo n.º 4
0
 public UnitOfWork(ApplicationDbContext db)
 {
     _db         = db;
     Gigs        = new GigRepository(db);
     Attendances = new AttendanceRepository(db);
     Followings  = new FollowingRepository(db);
     Genres      = new GenreRepository(db);
 }
Ejemplo n.º 5
0
 public GigsController()
 {
     db = new ApplicationDbContext();
     attendanceRepository = new AttendanceRepository(db);
     gigRepository        = new GigRepository(db);
     genreRepository      = new GenreRepository(db);
     followingRepository  = new FollowingRepository(db);
 }
Ejemplo n.º 6
0
 public PaddleController()
 {
     context              = new ApplicationDbContext();
     paddleRepository     = new PaddleRepository(context);
     attendanceRepository = new AttendanceRepository(context);
     followingRepository  = new FollowingRepository(context);
     paddleTypeRepository = new PaddleTypeRepository(context);
 }
Ejemplo n.º 7
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context             = context;
     GigRepository        = new GigRepository(context);
     AttendanceRepository = new AttendanceRepository(context);
     FollowingRepository  = new FollowingRepository(context);
     GenreRepository      = new GenreRepository(context);
 }
Ejemplo n.º 8
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _dbContext = context;
     Events     = new EventRepository(_dbContext);
     Attendence = new AttendenceRepository(_dbContext);
     Following  = new FollowingRepository(_dbContext);
     Genre      = new GenreRepository(_dbContext);
 }
Ejemplo n.º 9
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context   = context;
     Event      = new EventRepository(context);
     Follow     = new FollowingRepository(context);
     Attendance = new AttendanceRepository(context);
     EventType  = new EventTypeRepository(context);
 }
Ejemplo n.º 10
0
 public GigsController()
 {
     _context = new ApplicationDbContext();
     _attendanceRepository = new AttendanceRepository(_context);
     _genreRepository      = new GenreRepository(_context);
     _followingRepository  = new FollowingRepository(_context);
     _unitOfWork           = new UnitOfWork(_context);
 }
Ejemplo n.º 11
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context     = context;
     Gigs         = new GigRespository(_context);
     Attendance   = new AttendanceRepository(_context);
     Following    = new FollowingRepository(_context);
     Genre        = new GenreRepository(_context);
     Notification = new NotificationRepository(_context);
 }
Ejemplo n.º 12
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context          = context;
     Gigs              = new GigRepository(context);
     Attendances       = new AttendanceRepository(context);
     Followings        = new FollowingRepository(context);
     Genres            = new GenreRepository(context);
     UserNotifications = new UserNotificationRepository(context);
 }
Ejemplo n.º 13
0
 public MahfilController()
 {
     _context              = new ApplicationDbContext();
     _mahfilMepository     = new MahfilRepository();
     _attendanceRepository = new AttendanceRepository();
     _genreRepository      = new GenreRepository();
     _followingRepository  = new FollowingRepository();
     _unitOfWork           = new UnitOfWork();
 }
Ejemplo n.º 14
0
        public void SetUp()
        {
            _mockFollowings = new Mock <DbSet <Following> >();

            var mockContext = new Mock <IApplicationDbContext>();

            mockContext.SetupGet(c => c.Followings).Returns(_mockFollowings.Object);

            _repository = new FollowingRepository(mockContext.Object);
        }
Ejemplo n.º 15
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context          = context;
     Events            = new EventRepository(_context);
     Attendances       = new AttendanceRepository(_context);
     Followings        = new FollowingRepository(_context);
     Genres            = new GenreRepository(_context);
     Users             = new ApplicationUserRepository(_context);
     Notifications     = new NotificationRepository(_context);
     UserNotifications = new UserNotificationRepository(_context);
 }
Ejemplo n.º 16
0
        public UnitOfWork(ApplicationDbContext context)
        {
            _context = context;

            Coops             = new CoopRepository(_context);
            Attendances       = new AttendanceRepository(_context);
            Games             = new GameRepository(_context);
            Followings        = new FollowingRepository(_context);
            Users             = new ApplicationUserRepository(_context);
            Notifications     = new NotificationRepository(_context);
            UserNotifications = new UserNotificationRepository(_context);
        }
Ejemplo n.º 17
0
        // public IUserDescriptionRepository UserDescriptions { get; }

        public UnitOfWork(ApplicationDbContext context)
        {
            _context          = context;
            Gigs              = new GigRepository(_context);
            Attendances       = new AttendanceRepository(_context);
            Followings        = new FollowingRepository(_context);
            Genres            = new GenreRepository(_context);
            UserNotifications = new UserNotificationRepository(_context);
            Users             = new UserRepository(_context);
            Roles             = new RoleRepository(_context);
            Logins            = new LoginRepository(_context);
            //  UserDescriptions = new UserDescriptionRepository(_context);
        }
Ejemplo n.º 18
0
 public FollowingService(FollowingRepository repo, ProfilesRepository prepo, PostsRepository porepo)
 {
     _repo   = repo;
     _prepo  = prepo;
     _porepo = porepo;
 }