public AdminService(CoreaccesscontrolContext context, AppSettings appSettings, IEmailSender emailSender, IEmailService emailService)
 {
     _context      = context;
     _appSettings  = appSettings;
     _emailSender  = emailSender;
     _emailService = emailService;
 }
 public AuthenticationCodeService(CoreaccesscontrolContext context, IEmailSender emailSender, IEmailService emailService, IApiService apiService)
 {
     _context      = context;
     _emailSender  = emailSender;
     _emailService = emailService;
     _apiService   = apiService;
 }
        public AuthenticationCodeController GetAuthenticationCodeController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new AuthenticationCodeService(context, new FakeEmailSender(), new FakeEmailService(), apiService);

            return(new AuthenticationCodeController(service, authHelpers));
        }
        public KeyholderController GetKeyholderController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init("", "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new KeyholderService(context, apiService);

            return(new KeyholderController(service, authHelpers));
        }
        public AccessHistoryController GetAccessHistoryController(CoreaccesscontrolContext context, IApiService apiService)
        {
            Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
            var authHelpers = new AuthHelpers(GetMockHttpContextAccessor().Object);
            var service     = new AccessHistoryService(apiService);

            return(new AccessHistoryController(service, authHelpers));
        }
        public CoreaccesscontrolContext GetInMemoryContext()
        {
            var options = new DbContextOptionsBuilder <CoreaccesscontrolContext>()
                          .UseInMemoryDatabase(databaseName: this.GetType().Name)
                          .Options;

            var context = new CoreaccesscontrolContext(options);

            context.Database.EnsureDeleted();
            context.Database.EnsureCreated();

            return(context);
        }
 public AuthService GetAuthService(CoreaccesscontrolContext context)
 {
     Logger.Init(GetAppSettings().ConnectionStrings.DefaultConnection, "CoreAccessControl.log", "CoreAccessControl", Severity.Information, mock: true);
     return(new AuthService(context, GetAppSettings(), new FakeEmailSender(), new FakeEmailService()));
 }
Ejemplo n.º 8
0
 public LocationService(CoreaccesscontrolContext context)
 {
     _context = context;
 }
Ejemplo n.º 9
0
 public KeyholderService(CoreaccesscontrolContext context, IApiService apiService)
 {
     _context    = context;
     _apiService = apiService;
 }
Ejemplo n.º 10
0
 public AccountService(CoreaccesscontrolContext context, IEmailSender emailSender, IEmailService emailService)
 {
     _context      = context;
     _emailSender  = emailSender;
     _emailService = emailService;
 }