using LiteDB; using Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models; using squirrowse.core; namespace squirrowse.db { public class DbContext { private readonly LiteDatabase _context; public DbContext() { //BsonMapper.Global.Entity().DbRef(x => x.Objects); //BsonMapper.Global.Entity().DbRef(x => x.ObjectProperty); _context = new LiteDatabase("db.db"); _context.GetCollection(); _context.GetCollection(); _context.GetCollection(); BsonMapper.Global.IncludeFields = true; using (GetRepository) { GetRepository = _context; } } public ILiteCollection GetFrameCollection => _context.GetCollection(); public LiteDatabase GetRepository { get; } } }