Пример #1
0
        public UnitOfWork(ClamUserAccountContext context, IMapper mapper, UserManager <ClamUserAccountRegister> userManager,
                          SignInManager <ClamUserAccountRegister> signInManager, RoleManager <ClamRoles> roleManager,
                          IConfiguration config)
        {
            _context       = context;
            _userManager   = userManager;
            _signInManager = signInManager;
            _roleManager   = roleManager;
            _config        = config;
            _mapper        = mapper;

            // Instantiate Repositories with their respective dependencies
            UserAccount     = new UserAccountRepository(_context, _mapper, _userManager, _signInManager, _roleManager);
            RoleAccount     = new RoleAccountRepository(_context, _mapper, _userManager, _signInManager, _roleManager);
            EBooksControl   = new EBooksRepository(_context, _userManager, _mapper);
            MusicControl    = new MusicRepository(_context, _userManager, _mapper);
            FilmControl     = new FilmRepository(_context, _userManager, _mapper, _config);
            StorageControl  = new StorageRepository(_context, _userManager, _config, _mapper);
            AcademiaControl = new AcademiaRepository(_context, _userManager, _mapper, _config);
            TVShowControl   = new TVShowRepository(_context, _userManager, _mapper, _config);
            TicketControl   = new TicketRepository(_context, _userManager, _mapper);
            ProjectControl  = new ProjectsRepository(_context, _userManager, _mapper, _config);
        }
Пример #2
0
 public RoleAccountService()
 {
     _roleAccountRepository = new RoleAccountRepository();
 }