public UnitOfWork(ApplicationDbContext context) { _context = context; GigsRepository = new GigsRepository(_context); UserRepository = new UserRepository(_context); GenresRepository = new GenresRepository(_context); }
public HomeController() { _dbContext = new ApplicationDbContext(); _userId = System.Web.HttpContext.Current.User.Identity.GetUserId(); _gigsRepository = new GigsRepository(_dbContext); attendanceRepository = new AttendanceRepository(_dbContext); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Attendances = new AttendanceRepository(context); Gigs = new GigsRepository(context); Followers = new FollowerRepository(context); Genres = new GenreRepository(context); }
public UnitOfWork(ApplicationDbContext dbContext) { _dbContext = dbContext; Gigs = new GigsRepository(dbContext); Followings = new FollowingsRepository(dbContext); Genres = new GenreRepository(dbContext); Attendances = new AttendanceRepository(dbContext); }
public void TestInitialize() { _mockGigs = new Mock <DbSet <Gig> >(); var _mockContext = new Mock <IApplicationDbContext>(); _mockContext.Setup(c => c.Gigs).Returns(_mockGigs.Object); _repository = new GigsRepository(_mockContext.Object); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Gigs = new GigsRepository(_context); Users = new UserRepository(_context); Followings = new FollowingsRepository(_context); Genres = new GenresRepository(_context); Attendences = new AttendencesRepository(_context); }
public void TestInitiliaze() { _mockGiggDbSet = new Mock <DbSet <Gig> >(); var mockDbContext = new Mock <IApplicationDbContext>(); mockDbContext.SetupGet(m => m.Gigs).Returns(_mockGiggDbSet.Object); _repository = new GigsRepository(mockDbContext.Object); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Gigs = new GigsRepository(context); Attendances = new AttendanceRepository(context); Genres = new GenreRepository(context); Followings = new FollowingRepository(context); Users = new ApplicationUserRepository(context); Notifications = new NotificationsRepository(context); UserNotifications = new UserNotificationRepository(context); }
public void TestInitialize() { _mockGigs = new Mock <DbSet <Gig> >(); _mockAttendances = new Mock <DbSet <Attendance> >(); var mockContext = new Mock <IApplicationDbContext>(); mockContext.SetupGet(m => m.Gigs).Returns(_mockGigs.Object); mockContext.SetupGet(m => m.Attendances).Returns(_mockAttendances.Object); _repository = new GigsRepository(mockContext.Object); }
public void TestInitialize() { _userId = "1"; _mockContext = new Mock <IApplicationDbContext>(); _gigsRepository = new GigsRepository(_mockContext.Object); }
public HomeController() { _context = new ApplicationDbContext(); _gigsRepository = new GigsRepository(_context); _userRepository = new UserRepository(_context); }