public SensorsEvaluator(MobilityAIContext context, HttpClient client = null) { _context = context; if (client != null) { this.client = client; } }
// https://gist.github.com/mikebridge/a1188728a28f0f53b06fed791031c89d public static MobilityAIContext InMemoryContext() { // SEE: https://docs.microsoft.com/en-us/ef/core/miscellaneous/testing/sqlite var connection = new SqliteConnection("Data Source=:memory:"); var options = new DbContextOptionsBuilder <MobilityAIContext>() .UseSqlite(connection) .Options; connection.Open(); // create the schema using (var context = new MobilityAIContext(options)) { context.Database.EnsureCreated(); } return(new MobilityAIContext(options)); }
public SensorDataController(MobilityAIContext context) { _context = context; }
public UsersController(MobilityAIContext context) { _context = context; }
public SensorDataController(MobilityAIContext context) { evaluator = new SensorsEvaluator(context); }
public PatientsController(MobilityAIContext context) { evaluator = new PatientsEvaluator(context); }
public DevicesEvaluator(MobilityAIContext context) { _context = context; }
public PatientsEvaluator(MobilityAIContext context) { _context = context; }
public DevicesController(MobilityAIContext context) { _context = context; }
public DevicesController(MobilityAIContext context) { evaluator = new DevicesEvaluator(context); }
public UsersEvaluator(MobilityAIContext context) { _context = context; }
public PatientsController(MobilityAIContext context) { _context = context; }
public UsersController(MobilityAIContext context) { evaluator = new UsersEvaluator(context); }