예제 #1
0
 public SensorsEvaluator(MobilityAIContext context, HttpClient client = null)
 {
     _context = context;
     if (client != null)
     {
         this.client = client;
     }
 }
예제 #2
0
        // 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));
        }
예제 #3
0
 public SensorDataController(MobilityAIContext context)
 {
     _context = context;
 }
예제 #4
0
 public UsersController(MobilityAIContext context)
 {
     _context = context;
 }
 public SensorDataController(MobilityAIContext context)
 {
     evaluator = new SensorsEvaluator(context);
 }
예제 #6
0
 public PatientsController(MobilityAIContext context)
 {
     evaluator = new PatientsEvaluator(context);
 }
예제 #7
0
 public DevicesEvaluator(MobilityAIContext context)
 {
     _context = context;
 }
예제 #8
0
 public PatientsEvaluator(MobilityAIContext context)
 {
     _context = context;
 }
예제 #9
0
 public DevicesController(MobilityAIContext context)
 {
     _context = context;
 }
예제 #10
0
 public DevicesController(MobilityAIContext context)
 {
     evaluator = new DevicesEvaluator(context);
 }
예제 #11
0
 public UsersEvaluator(MobilityAIContext context)
 {
     _context = context;
 }
예제 #12
0
 public PatientsController(MobilityAIContext context)
 {
     _context = context;
 }
예제 #13
0
 public UsersController(MobilityAIContext context)
 {
     evaluator = new UsersEvaluator(context);
 }