Пример #1
0
 public UserOfficeManager(
     IUserOfficeRepository userOfficeRepository,
     IServiceProviderRepository serviceProviderRepository,
     IServiceTypeRepository serviceTypeRepository,
     IUserServcieRepository userServiceRepository,
     IOptions <AppSettings> appSettings,
     IUserServiceDataRepository userServiceDataRepository
     )
 {
     _userOfficeRepository      = userOfficeRepository;
     _serviceProviderRepository = serviceProviderRepository;
     _serviceTypeRepository     = serviceTypeRepository;
     _userServiceRepository     = userServiceRepository;
     _appSettings = appSettings;
     _userServiceDataRepository = userServiceDataRepository;
 }
Пример #2
0
        public OfficeController(
            IUserServcieRepository userServcieRepository,
            IHttpContextAccessor httpContextAccessor,
            IUserOfficeRepository userOfficeRepository,
            IUserOfficeManager userOfficeManager,
            IMapper mapper,
            IUserServiceDataRepository userServiceDataRepository)
        {
            _userServcieRepository = userServcieRepository;
            _httpContextAccessor   = httpContextAccessor;
            _userOfficeRepository  = userOfficeRepository;
            _userOfficeManager     = userOfficeManager;
            _mapper = mapper;
            _userServiceDataRepository = userServiceDataRepository;

            _currentUserId = _httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;

            UserOffice = _userOfficeRepository.GetSingle(x => x.UserId.Equals(_currentUserId));
        }
Пример #3
0
 public ApiController(
     IHttpContextAccessor httpContextAccessor,
     IUserServcieRepository userServiceRepository,
     IServiceStatusRepository serviceStatusRepository,
     IServiceTypeRepository serviceTypeRepository,
     IUserOfficeRepository userOfficeRepository,
     IUserOfficeManager userOfficeManager,
     IMapper mapper,
     IUserServiceDataRepository userServcieDataRepository
     )
 {
     _httpContextAccessor     = httpContextAccessor;
     _userServcieRepository   = userServiceRepository;
     _serviceStatusRepository = serviceStatusRepository;
     _serviceTypeRepository   = serviceTypeRepository;
     _userOfficeRepository    = userOfficeRepository;
     _userOfficeManager       = userOfficeManager;
     _mapper = mapper;
     _userServcieDataRepository = userServcieDataRepository;
 }