private static bool IsUserAuthorized(string userIdentity, string connection, DateTime?offset) { // Check token expiry if (offset == null || offset < DateTime.Now) { return(false); } var optionsBuilder = new DbContextOptionsBuilder <ThermoDataContext>(); optionsBuilder.UseSqlServer(connection); // Query the user to see if they are legi users var themorDataSource = new ThermoDataContext(optionsBuilder.Options); var userInDataStore = themorDataSource.Users.Where(x => x.Username == userIdentity).FirstOrDefault(); return(userInDataStore != null ? true : false); }
public EmailAlertRecipientDataProcessor(ThermoDataContext context) { _thermoDataContext = context; }
public SummaryEmailProviderDataProcessor(ThermoDataContext context) { _thermoDataContext = context; }
public DataStoreMessageProcessor(ThermoDataContext thermoDataContext) { _thermoDataContext = thermoDataContext; }
public PersonDataService(ThermoDataContext thermoDataContext) { _thermoDataContext = thermoDataContext; }
public UsersController(IOptions <AppSettings> appSettings, ThermoDataContext thermoDataContext) { _appSettings = appSettings.Value; _thermoDataContext = thermoDataContext; _personDataService = new PersonDataService(thermoDataContext); }
public SMTPSettingDataService(ThermoDataContext thermoDataContext) { _thermoDataContext = thermoDataContext; }
public MobileAPIController(IOptions <AppSettings> appSettings, ThermoDataContext thermoDataContext) { _appSettings = appSettings.Value; db = thermoDataContext; }
public SmtpSettingsController(IOptions <AppSettings> appSettings, ThermoDataContext thermoDataContext) { _appSettings = appSettings.Value; _thermoDataContext = thermoDataContext; _smtpDataService = new SMTPSettingDataService(thermoDataContext); }