コード例 #1
0
ファイル: UsersController.cs プロジェクト: rolando22/GigHub
 public UsersController(IUnitOfWork unitOfWork)
 {
     _unitOfWork         = unitOfWork;
     _followUpRepository = _unitOfWork.FollowUps;
     _gigRepository      = _unitOfWork.Gigs;
     _userRepository     = _unitOfWork.Users;
 }
コード例 #2
0
 public Zero1FiveTestDataSeedContributor(ICategoryRepository categoryRepository,
                                         IProductRepository productRepository,
                                         IGigRepository gigRepository)
 {
     this.categoryRepository = categoryRepository;
     this.productRepository  = productRepository;
     this.gigRepository      = gigRepository;
 }
コード例 #3
0
 public AttendancesController(IUnitOfWork unitOfWork)
 {
     _unitOfWork           = unitOfWork;
     _attendanceRepository = _unitOfWork.Attendances;
     _followUpRepository   = _unitOfWork.FollowUps;
     _gigRepository        = _unitOfWork.Gigs;
     _userRepository       = _unitOfWork.Users;
 }
コード例 #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);
 }
コード例 #5
0
 public GigsController(IUnitOfWork unitOfWork)
 {
     _unitOfWork             = unitOfWork;
     _attendanceRepository   = _unitOfWork.Attendances;
     _gigRepository          = _unitOfWork.Gigs;
     _inboxRepository        = _unitOfWork.Inboxes;
     _notificationRepository = _unitOfWork.Notifications;
     _userRepository         = _unitOfWork.Users;
 }
コード例 #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);
 }
コード例 #7
0
ファイル: GigAppService.cs プロジェクト: hnicolus/zero1five
 public GigAppService(
     IGigRepository repository,
     IGigManager gigManager,
     ICategoryRepository categoryRepository,
     IGigPictureContainerManager gigPictureContainerManager) : base(repository)
 {
     _gigManager                 = gigManager;
     _categoryRepository         = categoryRepository;
     _gigPictureContainerManager = gigPictureContainerManager;
     SetPermissions();
 }
コード例 #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();
 }
コード例 #9
0
ファイル: ValidationRules.cs プロジェクト: jyuma/SetGenerator
 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;
 }
コード例 #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;
        }
コード例 #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;
 }
コード例 #12
0
ファイル: GigsController.cs プロジェクト: jyuma/SetGenerator
        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);
        }
コード例 #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);
        }
コード例 #14
0
 public AdminHomeController(IGigRepository gigRepository)
 {
     if (gigRepository == null) throw new ArgumentNullException(nameof(gigRepository));
     _gigRepository = gigRepository;
 }
コード例 #15
0
 public GigController(IGigRepository gigRepository)
 {
     _gigRepository = gigRepository;
 }
コード例 #16
0
 public GigRepositoryTests()
 {
     _gigRepository = GetRequiredService <IGigRepository>();
 }
コード例 #17
0
 public GigController (IGigRepository repository)
 {
     if (repository == null) throw new ArgumentNullException(nameof(repository));
     gigRepository = repository;
 }
コード例 #18
0
 public UnitOfWork(DataContext context)
 {
     _context = context;
     _context.Database.BeginTransaction();
     Gigs = new GigRepository(_context);
 }
コード例 #19
0
 public GigAppServiceTests()
 {
     _gigRepository = GetRequiredService <IGigRepository>();
     _gigAppService = GetRequiredService <IGigAppService>();
 }
コード例 #20
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context = context;
     Gigs     = new GigRepository(context);
 }
コード例 #21
0
 public GigManager(IGigRepository gigRepository)
 {
     _gigRepository = gigRepository;
 }
コード例 #22
0
 public GigsController(IGigRepository repo) => _repository = repo;
コード例 #23
0
 public void TearDown()
 {
     _mockContext   = null;
     _mockGigs      = null;
     _gigRepository = null;
 }