Exemplo n.º 1
0
 public ApartmentHandler(IApartmentRepository repository, ICondominiumRepository condominiumRepository,
                         IResidentRepository residentRepository)
 {
     _repository            = repository;
     _condominiumRepository = condominiumRepository;
     _residentRepository    = residentRepository;
 }
Exemplo n.º 2
0
 public ResidentsController(IResidentRepository residentRepository,
                            IUnitOfWork unitOfWork, IMapper mapper)
 {
     this._mapper             = mapper;
     this._unitOfWork         = unitOfWork;
     this._residentRepository = residentRepository;
 }
Exemplo n.º 3
0
 public ResidentsController(IResidentRepository reRepo, IApplicationRepository apRepo, IAccountRepository accRepo, IEmailSender emailSender)
 {
     _reRepo      = reRepo;
     _apRepo      = apRepo;
     _accRepo     = accRepo;
     _emailSender = emailSender;
 }
 public UnitTestBase()
 {
     _map     = new MappingEngine(BootStrapMapper.BootstrapMapper());
     _context = new MockResidentDBContext();
     _logger  = new LoggerManager();
     _repo    = new ResidentRepository(_context, _map, _logger);
     _service = new ResidentService(_repo, _logger);
 }
Exemplo n.º 5
0
        internal static Resident GetCurrentResidentUser(IResidentRepository repository, ApplicationUser appUser)
        {
            Resident resident = null;

            if (appUser != null && !(string.IsNullOrEmpty(appUser.UserName)) && appUser.ClassType.Equals("SgConAPI.Models.Resident"))
            {
                resident = repository.GetResidentByUserName(appUser.UserName);
            }
            return(resident);
        }
Exemplo n.º 6
0
        public IEnumerable <GetResidentQueryResult> GetAllActive(
            [FromServices] IResidentRepository repository,
            [FromServices] IMapper mapper
            )
        {
            var user   = User.Claims.FirstOrDefault(x => x.Type == "user_id")?.Value;
            var result = repository.GetAllActive(user);

            return(mapper.Map <List <GetResidentQueryResult> >(result));
        }
Exemplo n.º 7
0
 public JwtFactory(
     JwtCurrentUserFactory jwtCurrentUserFactory,
     SgConContext context,
     IEmployeeRepository employeeRepository,
     IResidentRepository residentRepository)
 {
     _jwCurrentUsertFactory = jwtCurrentUserFactory;
     _context            = context;
     _employeeRepository = employeeRepository;
     _residentRepository = residentRepository;
 }
Exemplo n.º 8
0
 public UnitOfWork(MapDbContext context, IApartmentRepository apartmentRepository,
                   IRepository <City> cityRepository, IRepository <Country> countryRepository,
                   IRepository <House> houseRepository, IResidentRepository residentRepository,
                   IRepository <Street> streetRepository, IRepository <ApartmentResidents> apartmentResidentsRepository,
                   UserManager <User> userManager, SignInManager <User> signInManager)
 {
     _context                     = context;
     ApartmentRepository          = apartmentRepository;
     CityRepository               = cityRepository;
     CountryRepository            = countryRepository;
     HouseRepository              = houseRepository;
     ResidentRepository           = residentRepository;
     StreetRepository             = streetRepository;
     ApartmentResidentsRepository = apartmentResidentsRepository;
     UserManager                  = userManager;
     SignInManager                = signInManager;
 }
Exemplo n.º 9
0
        public AuthController(
            IOptions <JwtIssuerOptions> jwtOptions,
            JwtCurrentUserFactory jwtCurrentUserFactory,
            JwtFactory jwtFactory,
            IEmployeeRepository employeeRepository,
            IEmployeeBusinessService employeeBusinessService,
            IResidentRepository residentRepository,
            IResidentBusinessService residentBusinessService)
        {
            _jwtOptions = jwtOptions.Value;
            _jwtFactory = jwtFactory;

            _employeeRepository      = employeeRepository;
            _employeeBusinessService = employeeBusinessService;

            _residentRepository      = residentRepository;
            _residentBusinessService = residentBusinessService;
        }
Exemplo n.º 10
0
 /// <summary>
 /// Constructor with injectibles
 /// </summary>
 /// <param name="residentRepo"></param>
 public ResidentService(IResidentRepository residentRepo)
 {
     _residentRepo = residentRepo;
 }
 public InstitutionController(IInstitutionRepository institutionRepo, IResidentRepository residentRepo, ILogger logger)
 {
     _institutionRepo = institutionRepo;
     _residentRepo    = residentRepo;
     _logger          = logger;
 }
Exemplo n.º 12
0
 public MedicationsController(IMedicationRepository apRepo, IResidentRepository reRepo, IEmailSender emailSender)
 {
     _meRepo      = apRepo;
     _reRepo      = reRepo;
     _emailSender = emailSender;
 }
Exemplo n.º 13
0
 public ResidentBusiness(IResidentRepository residentRepository)
 {
     _residentRepository = residentRepository;
 }
 public ResidentService(IResidentRepository repo, ILoggerManager loggerManager)
 {
     residentRepo = repo;
     logger       = loggerManager;
 }
Exemplo n.º 15
0
 public HotelController(IResidentRepository residentRepository)
 {
     _residentRepository = residentRepository;
 }
 public ResidentController(IResidentRepository repository)
 {
     _repository = repository;
 }
Exemplo n.º 17
0
 // Constructor
 public ResidentsController(IResidentRepository ResidentRepo, IMapper mapper)
 {
     _reRepo = ResidentRepo;
     _mapper = mapper;
 }
Exemplo n.º 18
0
 public ResidentController(IResidentService residentSvc, IResidentRepository residentRepo, ILogger logger)
 {
     _residentSvc  = residentSvc;
     _residentRepo = residentRepo;
     _logger       = logger;
 }
Exemplo n.º 19
0
 public AccountController(IResidentRepository reRepo, IAccountRepository accRepo, IHttpContextAccessor httpContextAccessor)
 {
     _reRepo              = reRepo;
     _accRepo             = accRepo;
     _httpContextAccessor = httpContextAccessor;
 }
Exemplo n.º 20
0
 public ResidentHandler(IResidentRepository repository, IApartmentRepository apartmentRepository)
 {
     _repository          = repository;
     _apartmentRepository = apartmentRepository;
 }
 public ResidentApplicationServices(IResidentRepository residentRepository)
 {
     _residentRepository = residentRepository;
 }