示例#1
0
        static Program()
        {
            AppDbContextFactory factory = new AppDbContextFactory();

            _appContext                = factory.CreateDbContext(null);
            _albumRepository           = new AlbumRepository(_appContext);
            _artRepository             = new ArtRepository(_appContext);
            _artistDataRepository      = new ArtistDataRepository(_appContext);
            _commonUserDataRepository  = new CommonUserDataRepository(_appContext);
            _countryRepository         = new CountryRepository(_appContext);
            _distributorDataRepository = new DistributorDataRepository(_appContext);
            _genreRepository           = new GenreRepository(_appContext);
            _playlistRepository        = new PlaylistRepository(_appContext);
            _trackRepository           = new TrackRepository(_appContext);
            _userRepository            = new UserRepository(_appContext);
            _userLibraryRepository     = new UserLibraryRepository(_appContext);
        }
示例#2
0
 public AgreementsController(IUserLibraryRepository agreementLibraryRepository, IMapper mapper)
 {
     _userLibraryRepository = agreementLibraryRepository ??
                              throw new ArgumentNullException(nameof(agreementLibraryRepository));
     _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 public UsersController(IUserLibraryRepository userLibraryRepository, IMapper mapper, IPropertyCheckerService propertyCheckerService)
 {
     _userLibraryRepository = userLibraryRepository ?? throw new ArgumentNullException(nameof(userLibraryRepository));
     _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _propertyCheckerService = propertyCheckerService ?? throw new ArgumentNullException(nameof(propertyCheckerService));
 }
 public UserLibraryController(IUserLibraryRepository userLibraryRepository)
 {
     _repository = userLibraryRepository;
 }