Exemplo n.º 1
0
 public UsersController(IUnitOfWork unitOfWork)
 {
     _unitOfWork         = unitOfWork;
     _followUpRepository = _unitOfWork.FollowUps;
     _gigRepository      = _unitOfWork.Gigs;
     _userRepository     = _unitOfWork.Users;
 }
 public Zero1FiveTestDataSeedContributor(ICategoryRepository categoryRepository,
                                         IProductRepository productRepository,
                                         IGigRepository gigRepository)
 {
     this.categoryRepository = categoryRepository;
     this.productRepository  = productRepository;
     this.gigRepository      = gigRepository;
 }
Exemplo n.º 3
0
 public AttendancesController(IUnitOfWork unitOfWork)
 {
     _unitOfWork           = unitOfWork;
     _attendanceRepository = _unitOfWork.Attendances;
     _followUpRepository   = _unitOfWork.FollowUps;
     _gigRepository        = _unitOfWork.Gigs;
     _userRepository       = _unitOfWork.Users;
 }
Exemplo n.º 4
0
 private void InitializeGigRepository(IList <Gig> data)
 {
     /* Note the repository must be initialized after mockGigs due to
      * a Moq feature that was removed. In particular, _mockContext
      * depends on _mockGigs and the repo depends on _mockContext */
     _mockGigs.SetSource(data);
     _mockContext.SetupGet(c => c.Gigs).Returns(_mockGigs.Object);
     _gigRepository = new GigRepository(_mockContext.Object);
 }
Exemplo n.º 5
0
 public GigsController(IUnitOfWork unitOfWork)
 {
     _unitOfWork             = unitOfWork;
     _attendanceRepository   = _unitOfWork.Attendances;
     _gigRepository          = _unitOfWork.Gigs;
     _inboxRepository        = _unitOfWork.Inboxes;
     _notificationRepository = _unitOfWork.Notifications;
     _userRepository         = _unitOfWork.Users;
 }
Exemplo n.º 6
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context = context;
     // _context = new ApplicationDbContext();
     Gigs        = new GigRepository(context);
     Attendances = new AttendanceRepository(context);
     Followings  = new FollowingRepository(context);
     Genres      = new GenreRepository(context);
 }
Exemplo n.º 7
0
 public GigAppService(
     IGigRepository repository,
     IGigManager gigManager,
     ICategoryRepository categoryRepository,
     IGigPictureContainerManager gigPictureContainerManager) : base(repository)
 {
     _gigManager                 = gigManager;
     _categoryRepository         = categoryRepository;
     _gigPictureContainerManager = gigPictureContainerManager;
     SetPermissions();
 }
Exemplo n.º 8
0
 public ProductAppService(
     IProductRepository repository,
     ICategoryRepository categoryRepository,
     IGigRepository gigRepository,
     IProductManager productManager, IProductPictureManager productPictureManager) : base(repository)
 {
     _categoryRepository    = categoryRepository;
     _gigRepository         = gigRepository;
     _productManager        = productManager;
     _productPictureManager = productPictureManager;
     SetPermissions();
 }
Exemplo n.º 9
0
 public ValidationRules(IBandRepository bandRepository,
                         IMemberRepository memberRepository, 
                         ISongRepository songRepository, 
                         ISetlistRepository setListRepository, 
                         IGigRepository gigRepository,
                         IInstrumentRepository instrumentRepository)
 {
     _bandRepository = bandRepository;
     _memberRepository = memberRepository;
     _songRepository = songRepository;
     _setListRepository = setListRepository;
     _gigRepository = gigRepository;
     _instrumentRepository = instrumentRepository;
 }
Exemplo n.º 10
0
        public UnitOfWork(ApplicationDbContext context,
                          IGigRepository gigRepository,
                          IAttendanceRepository attendanceRepository,
                          IFollowingRepository followingRepository,
                          IGenreRepository genreRepository,
                          INotificationRepository notificationRepository)
        {
            _context = context;

            Gigs          = gigRepository;
            Attendances   = attendanceRepository;
            Followings    = followingRepository;
            Genres        = genreRepository;
            Notifications = notificationRepository;
        }
Exemplo n.º 11
0
 public UnitOfWork(ApplicationDbContext _db,
                   IAttendanceRepository attendanceRepository,
                   IGigRepository gigRepository,
                   IGenreRepository genreRepository,
                   IApplicationUserRepository applicationUserRepository,
                   IFollowingRepository followingRepository,
                   INotificationRepository notificationRepository)
 {
     this._db             = _db;
     this.Attendance      = attendanceRepository;
     this.Gig             = gigRepository;
     this.Genre           = genreRepository;
     this.ApplicationUser = applicationUserRepository;
     this.Following       = followingRepository;
     this.Notification    = notificationRepository;
 }
Exemplo n.º 12
0
        public GigsController(  IBandRepository bandRepository,
                                IGigRepository gigRepository,
                                ISetlistRepository setlistRepository,
                                IValidationRules validationRules, 
                                IAccount account)
        {
            _bandRepository = bandRepository;
            _gigRepository = gigRepository;
            _setlistRepository = setlistRepository;
            _validationRules = validationRules;

            var currentUserName = GetCurrentSessionUser();
            if (currentUserName.Length > 0)
                _currentUser = account.GetUserByUserName(currentUserName);
            _common = new CommonSong(account, currentUserName);
        }
Exemplo n.º 13
0
        public SetlistsController(  IBandRepository bandRepository, 
                                    ISetlistRepository setlistRepository,
                                    ISetSongRepository setSongRepository,
                                    ISongRepository songRepository,
                                    IGigRepository gigRepository, 
                                    IAccount account, 
                                    IValidationRules validationRules)
        {
            var currentUserName = GetCurrentSessionUser();
            _currentUser = (currentUserName.Length > 0) ? account.GetUserByUserName(currentUserName) : null;

            _bandRepository = bandRepository;
            _setlistRepository = setlistRepository;
            _setSongRepository = setSongRepository;
            _songRepository = songRepository;
            _gigRepository = gigRepository;
            _validationRules = validationRules;
            _common = new CommonSong(account, currentUserName);
        }
Exemplo n.º 14
0
 public AdminHomeController(IGigRepository gigRepository)
 {
     if (gigRepository == null) throw new ArgumentNullException(nameof(gigRepository));
     _gigRepository = gigRepository;
 }
Exemplo n.º 15
0
 public GigController(IGigRepository gigRepository)
 {
     _gigRepository = gigRepository;
 }
Exemplo n.º 16
0
 public GigRepositoryTests()
 {
     _gigRepository = GetRequiredService <IGigRepository>();
 }
Exemplo n.º 17
0
 public GigController (IGigRepository repository)
 {
     if (repository == null) throw new ArgumentNullException(nameof(repository));
     gigRepository = repository;
 }
Exemplo n.º 18
0
 public UnitOfWork(DataContext context)
 {
     _context = context;
     _context.Database.BeginTransaction();
     Gigs = new GigRepository(_context);
 }
Exemplo n.º 19
0
 public GigAppServiceTests()
 {
     _gigRepository = GetRequiredService <IGigRepository>();
     _gigAppService = GetRequiredService <IGigAppService>();
 }
Exemplo n.º 20
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context = context;
     Gigs     = new GigRepository(context);
 }
Exemplo n.º 21
0
 public GigManager(IGigRepository gigRepository)
 {
     _gigRepository = gigRepository;
 }
Exemplo n.º 22
0
 public GigsController(IGigRepository repo) => _repository = repo;
Exemplo n.º 23
0
 public void TearDown()
 {
     _mockContext   = null;
     _mockGigs      = null;
     _gigRepository = null;
 }