public SNMPController(SNMPServices services, EthernetSwitchContext context, ITrapUsersRepository trapUsersRepository, ISettingsRepository settingsRepository, ISNMPMessageStore messageStore) { _services = services; _context = context; this.trapUsersRepository = trapUsersRepository; this.settingsRepository = settingsRepository; this.messageStore = messageStore; }
public UserService(EthernetSwitchContext context) { _context = context; _passwordHasher = new PasswordHasher <string>(); if (!_context.Users.Any()) { _context.Users.Add(new User { PasswordEncrypted = "AQAAAAEAACcQAAAAEGFy8Wkpl5tSDHaZ0Gb1k5ZfUL2vWNmGncAD199qZkhFgvsvN/D16BZI0kkgxal4vw==", UserName = "******", Role = UserRole.Admin }); _context.SaveChanges(); } }
public SettingsRepository(EthernetSwitchContext context) { _context = context; if (!context.Settings.Any()) { context.Settings.Add(new Data.Models.Settings { AllowRegistration = false, AllowTagging = false, RequireConfirmation = true, SNMPConfiguration = new Data.Models.SNMPConfiguration() }); context.SaveChanges(); } }
public SNMPMessageStore(EthernetSwitchContext context) { _context = context; }
public TrapUsersRepository(EthernetSwitchContext context) { this.context = context; }