public void TestInitialize() { _mockGigs = new Mock <DbSet <Gig> >(); var mockContext = new Mock <IApplicationDbContext>(); mockContext.SetupGet(c => c.Gigs).Returns(_mockGigs.Object); _repository = new GigRepositroy(mockContext.Object); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Gigs = new GigRepositroy(context); Attendances = new AttendanceRepository(context); Follows = new FollowingRepository(context); Genres = new GenreRepository(context); Notifications = new NotificationRepository(context); UserNotifications = new UserNotificationRepository(context); }