mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:56:31 +00:00
small fixes, renames
This commit is contained in:
@@ -39,10 +39,10 @@ public class DbFactory : IDbFactory
|
||||
_memoryConnection = new SQLiteConnection(MemoryConnStr);
|
||||
_memoryConnection.Open();
|
||||
_memoryDataOptions = new DataOptions()
|
||||
.UseDataProvider(SQLiteTools.GetDataProvider())
|
||||
.UseConnection(_memoryConnection)
|
||||
.UseMappingSchema(AnnotationsDbSchemaHolder.MappingSchema);
|
||||
//.UseTracing(TraceLevel.Info, t => logger.LogInformation(t.SqlText));
|
||||
.UseDataProvider(SQLiteTools.GetDataProvider())
|
||||
.UseConnection(_memoryConnection)
|
||||
.UseMappingSchema(AnnotationsDbSchemaHolder.MappingSchema)
|
||||
;//.UseTracing(TraceLevel.Info, t => logger.LogInformation(t.SqlText));
|
||||
|
||||
|
||||
_fileConnection = new SQLiteConnection(FileConnStr);
|
||||
@@ -50,7 +50,6 @@ public class DbFactory : IDbFactory
|
||||
.UseDataProvider(SQLiteTools.GetDataProvider())
|
||||
.UseConnection(_fileConnection)
|
||||
.UseMappingSchema(AnnotationsDbSchemaHolder.MappingSchema);
|
||||
_ = _fileDataOptions.UseTracing(TraceLevel.Info, t => logger.LogInformation(t.SqlText));
|
||||
|
||||
if (!File.Exists(_annConfig.AnnotationsDbFile))
|
||||
CreateDb();
|
||||
@@ -122,6 +121,11 @@ public static class AnnotationsDbSchemaHolder
|
||||
.HasTableName(Constants.ANNOTATIONS_TABLENAME)
|
||||
.HasPrimaryKey(x => x.Name)
|
||||
.Ignore(x => x.Time)
|
||||
.Ignore(x => x.Classes)
|
||||
.Ignore(x => x.ImagePath)
|
||||
.Ignore(x => x.LabelPath)
|
||||
.Ignore(x => x.ThumbPath)
|
||||
.Ignore(x => x.OriginalMediaName)
|
||||
.Association(a => a.Detections, (a, d) => a.Name == d.AnnotationName);
|
||||
|
||||
builder.Entity<Detection>()
|
||||
|
||||
Reference in New Issue
Block a user