Beispiel #1
0
        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);
        }
Beispiel #2
0
 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);
 }