diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
index 7662a812d..552282d5f 100644
--- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml
+++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml
@@ -57,6 +57,7 @@
+
@@ -302,10 +303,17 @@
+
+
+
+
+
+
+
diff --git a/DiscImageChef.Core/DiscImageChef.Core.csproj b/DiscImageChef.Core/DiscImageChef.Core.csproj
index 4d15b6d66..43295f53f 100644
--- a/DiscImageChef.Core/DiscImageChef.Core.csproj
+++ b/DiscImageChef.Core/DiscImageChef.Core.csproj
@@ -110,6 +110,7 @@
{ccaa7afe-c094-4d82-a66d-630de8a3f545}
DiscImageChef.Console
+
{D7016DF2-5A5E-4524-B40D-BA2D59576688}
DiscImageChef.Filesystems
diff --git a/DiscImageChef.Core/Statistics.cs b/DiscImageChef.Core/Statistics.cs
index 49c2b39b2..376f10679 100644
--- a/DiscImageChef.Core/Statistics.cs
+++ b/DiscImageChef.Core/Statistics.cs
@@ -39,7 +39,9 @@ using System.Threading;
using System.Xml.Serialization;
using DiscImageChef.CommonTypes.Interop;
using DiscImageChef.CommonTypes.Metadata;
-using DiscImageChef.Devices;
+using DiscImageChef.Database;
+using DiscImageChef.Database.Models;
+using Device = DiscImageChef.Devices.Device;
using MediaType = DiscImageChef.CommonTypes.MediaType;
using Version = DiscImageChef.CommonTypes.Interop.Version;
@@ -63,6 +65,8 @@ namespace DiscImageChef.Core
///
static bool submitStatsLock;
+ static DicContext ctx = new DicContext();
+
///
/// Loads saved statistics from disk
///
@@ -126,6 +130,8 @@ namespace DiscImageChef.Core
///
public static void SaveStats()
{
+ ctx.SaveChanges();
+
if(AllStats == null) return;
if(AllStats.OperatingSystems != null)
@@ -220,7 +226,7 @@ namespace DiscImageChef.Core
System.Console.WriteLine("Uploading partial statistics file {0}", statsFile);
#else
DiscImageChef.Console.DicConsole.DebugWriteLine("Submit stats", "Uploading partial statistics file {0}", statsFile);
- #endif
+ #endif
FileStream fs = new FileStream(statsFile, FileMode.Open, FileAccess.Read);
XmlSerializer xs = new XmlSerializer(stats.GetType());
@@ -261,7 +267,7 @@ namespace DiscImageChef.Core
throw;
#else
continue;
- #endif
+ #endif
}
submitStatsLock = false;
@@ -275,99 +281,11 @@ namespace DiscImageChef.Core
/// Command
public static void AddCommand(string command)
{
+ if(string.IsNullOrWhiteSpace(command)) return;
+
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.DeviceStats) return;
- if(AllStats.Commands == null) AllStats.Commands = new CommandsStats();
-
- if(CurrentStats.Commands == null) CurrentStats.Commands = new CommandsStats();
-
- switch(command)
- {
- case "analyze":
- AllStats.Commands.Analyze++;
- CurrentStats.Commands.Analyze++;
- break;
- case "benchmark":
- AllStats.Commands.Benchmark++;
- CurrentStats.Commands.Benchmark++;
- break;
- case "checksum":
- AllStats.Commands.Checksum++;
- CurrentStats.Commands.Checksum++;
- break;
- case "compare":
- AllStats.Commands.Compare++;
- CurrentStats.Commands.Compare++;
- break;
- case "create-sidecar":
- AllStats.Commands.CreateSidecar++;
- CurrentStats.Commands.CreateSidecar++;
- break;
- case "decode":
- AllStats.Commands.Decode++;
- CurrentStats.Commands.Decode++;
- break;
- case "device-info":
- AllStats.Commands.DeviceInfo++;
- CurrentStats.Commands.DeviceInfo++;
- break;
- case "device-report":
- AllStats.Commands.DeviceReport++;
- CurrentStats.Commands.DeviceReport++;
- break;
- case "dump-media":
- AllStats.Commands.DumpMedia++;
- CurrentStats.Commands.DumpMedia++;
- break;
- case "entropy":
- AllStats.Commands.Entropy++;
- CurrentStats.Commands.Entropy++;
- break;
- case "extract-files":
- AllStats.Commands.ExtractFiles++;
- CurrentStats.Commands.ExtractFiles++;
- break;
- case "formats":
- AllStats.Commands.Formats++;
- CurrentStats.Commands.Formats++;
- break;
- case "ls":
- AllStats.Commands.Ls++;
- CurrentStats.Commands.Ls++;
- break;
- case "media-info":
- AllStats.Commands.MediaInfo++;
- CurrentStats.Commands.MediaInfo++;
- break;
- case "media-scan":
- AllStats.Commands.MediaScan++;
- CurrentStats.Commands.MediaScan++;
- break;
- case "print-hex":
- AllStats.Commands.PrintHex++;
- CurrentStats.Commands.PrintHex++;
- break;
- case "verify":
- AllStats.Commands.Verify++;
- CurrentStats.Commands.Verify++;
- break;
- case "list-devices":
- AllStats.Commands.ListDevices++;
- CurrentStats.Commands.ListDevices++;
- break;
- case "list-encodings":
- AllStats.Commands.ListEncodings++;
- CurrentStats.Commands.ListEncodings++;
- break;
- case "convert-image":
- AllStats.Commands.ConvertImage++;
- CurrentStats.Commands.ConvertImage++;
- break;
- case "image-info":
- AllStats.Commands.ImageInfo++;
- CurrentStats.Commands.ImageInfo++;
- break;
- }
+ ctx.Commands.Add(new Command {Name = command, Synchronized = false});
}
///
@@ -376,44 +294,11 @@ namespace DiscImageChef.Core
/// Filesystem name
public static void AddFilesystem(string filesystem)
{
+ if(string.IsNullOrWhiteSpace(filesystem)) return;
+
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.FilesystemStats) return;
- if(AllStats.Filesystems == null) AllStats.Filesystems = new List();
- if(CurrentStats.Filesystems == null) CurrentStats.Filesystems = new List();
-
- NameValueStats old = AllStats.Filesystems.FirstOrDefault(nvs => nvs.name == filesystem);
-
- NameValueStats nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- AllStats.Filesystems.Remove(old);
- }
- else
- {
- nw.name = filesystem;
- nw.Value = 1;
- }
-
- AllStats.Filesystems.Add(nw);
-
- old = CurrentStats.Filesystems.FirstOrDefault(nvs => nvs.name == filesystem);
-
- nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- CurrentStats.Filesystems.Remove(old);
- }
- else
- {
- nw.name = filesystem;
- nw.Value = 1;
- }
-
- CurrentStats.Filesystems.Add(nw);
+ ctx.Filesystems.Add(new Filesystem {Name = filesystem, Synchronized = false});
}
///
@@ -422,58 +307,29 @@ namespace DiscImageChef.Core
/// Partition scheme name
internal static void AddPartition(string partition)
{
+ if(string.IsNullOrWhiteSpace(partition)) return;
+
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.PartitionStats) return;
- if(AllStats.Partitions == null) AllStats.Partitions = new List();
- if(CurrentStats.Partitions == null) CurrentStats.Partitions = new List();
-
- NameValueStats old = AllStats.Partitions.FirstOrDefault(nvs => nvs.name == partition);
-
- NameValueStats nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- AllStats.Partitions.Remove(old);
- }
- else
- {
- nw.name = partition;
- nw.Value = 1;
- }
-
- AllStats.Partitions.Add(nw);
-
- old = CurrentStats.Partitions.FirstOrDefault(nvs => nvs.name == partition);
-
- nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- CurrentStats.Partitions.Remove(old);
- }
- else
- {
- nw.name = partition;
- nw.Value = 1;
- }
-
- CurrentStats.Partitions.Add(nw);
+ ctx.Partitions.Add(new Partition {Name = partition, Synchronized = false});
}
///
/// Adds a new filter to statistics
///
- /// Filter name
- public static void AddFilter(string format)
+ /// Filter name
+ public static void AddFilter(string filter)
{
+ if(string.IsNullOrWhiteSpace(filter)) return;
+
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.FilterStats) return;
+ ctx.Filters.Add(new Filter {Name = filter, Synchronized = false});
+
if(AllStats.Filters == null) AllStats.Filters = new List();
if(CurrentStats.Filters == null) CurrentStats.Filters = new List();
- NameValueStats old = AllStats.Filters.FirstOrDefault(nvs => nvs.name == format);
+ NameValueStats old = AllStats.Filters.FirstOrDefault(nvs => nvs.name == filter);
NameValueStats nw = new NameValueStats();
if(old != null)
@@ -484,13 +340,13 @@ namespace DiscImageChef.Core
}
else
{
- nw.name = format;
+ nw.name = filter;
nw.Value = 1;
}
AllStats.Filters.Add(nw);
- old = CurrentStats.Filters.FirstOrDefault(nvs => nvs.name == format);
+ old = CurrentStats.Filters.FirstOrDefault(nvs => nvs.name == filter);
nw = new NameValueStats();
if(old != null)
@@ -501,7 +357,7 @@ namespace DiscImageChef.Core
}
else
{
- nw.name = format;
+ nw.name = filter;
nw.Value = 1;
}
@@ -514,44 +370,11 @@ namespace DiscImageChef.Core
/// Media image name
public static void AddMediaFormat(string format)
{
+ if(string.IsNullOrWhiteSpace(format)) return;
+
if(Settings.Settings.Current.Stats == null || !Settings.Settings.Current.Stats.MediaImageStats) return;
- if(AllStats.MediaImages == null) AllStats.MediaImages = new List();
- if(CurrentStats.MediaImages == null) CurrentStats.MediaImages = new List();
-
- NameValueStats old = AllStats.MediaImages.FirstOrDefault(nvs => nvs.name == format);
-
- NameValueStats nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- AllStats.MediaImages.Remove(old);
- }
- else
- {
- nw.name = format;
- nw.Value = 1;
- }
-
- AllStats.MediaImages.Add(nw);
-
- old = CurrentStats.MediaImages.FirstOrDefault(nvs => nvs.name == format);
-
- nw = new NameValueStats();
- if(old != null)
- {
- nw.name = old.name;
- nw.Value = old.Value + 1;
- CurrentStats.MediaImages.Remove(old);
- }
- else
- {
- nw.name = format;
- nw.Value = 1;
- }
-
- CurrentStats.MediaImages.Add(nw);
+ ctx.MediaFormats.Add(new MediaFormat {Name = format, Synchronized = false});
}
///
diff --git a/DiscImageChef.Database/Context.cs b/DiscImageChef.Database/Context.cs
index 1d7418aea..166324010 100644
--- a/DiscImageChef.Database/Context.cs
+++ b/DiscImageChef.Database/Context.cs
@@ -37,13 +37,19 @@ namespace DiscImageChef.Database
{
public sealed class DicContext : DbContext
{
+ // Note: If table does not appear check that last migration has been REALLY added to the project
public DicContext()
{
Database.Migrate();
}
- public DbSet Devices { get; set; }
- public DbSet Reports { get; set; }
+ public DbSet Devices { get; set; }
+ public DbSet Reports { get; set; }
+ public DbSet Commands { get; set; }
+ public DbSet Filesystems { get; set; }
+ public DbSet Filters { get; set; }
+ public DbSet MediaFormats { get; set; }
+ public DbSet Partitions { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
diff --git a/DiscImageChef.Database/DiscImageChef.Database.csproj b/DiscImageChef.Database/DiscImageChef.Database.csproj
index 4ac4200e1..0f85a2d4a 100644
--- a/DiscImageChef.Database/DiscImageChef.Database.csproj
+++ b/DiscImageChef.Database/DiscImageChef.Database.csproj
@@ -64,8 +64,15 @@
+
+
+
+
+
+
+
diff --git a/DiscImageChef.Database/Migrations/20181221015906_NameValueStatistics.Designer.cs b/DiscImageChef.Database/Migrations/20181221015906_NameValueStatistics.Designer.cs
new file mode 100644
index 000000000..70a3c6270
--- /dev/null
+++ b/DiscImageChef.Database/Migrations/20181221015906_NameValueStatistics.Designer.cs
@@ -0,0 +1,1329 @@
+//
+using System;
+using DiscImageChef.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace DiscImageChef.Database.Migrations
+{
+ [DbContext(typeof(DicContext))]
+ [Migration("20181221015906_NameValueStatistics")]
+ partial class NameValueStatistics
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.1.4-rtm-31024");
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ata", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Identify");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.ToTable("Ata");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.BlockDescriptor", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockLength");
+
+ b.Property("Blocks");
+
+ b.Property("Density");
+
+ b.Property("ScsiModeId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("BlockDescriptor");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Chs", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Cylinders");
+
+ b.Property("Heads");
+
+ b.Property("Sectors");
+
+ b.HasKey("Id");
+
+ b.ToTable("Chs");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.DensityCode", b =>
+ {
+ b.Property("Code")
+ .ValueGeneratedOnAdd();
+
+ b.Property("SscSupportedMediaId");
+
+ b.HasKey("Code");
+
+ b.HasIndex("SscSupportedMediaId");
+
+ b.ToTable("DensityCode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.FireWire", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Manufacturer");
+
+ b.Property("Product");
+
+ b.Property("ProductID");
+
+ b.Property("RemovableMedia");
+
+ b.Property("VendorID");
+
+ b.HasKey("Id");
+
+ b.ToTable("FireWire");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Mmc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("FeaturesId");
+
+ b.Property("ModeSense2AId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FeaturesId");
+
+ b.HasIndex("ModeSense2AId");
+
+ b.ToTable("Mmc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcFeatures", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AACSVersion");
+
+ b.Property("AGIDs");
+
+ b.Property("BindingNonceBlocks");
+
+ b.Property("BlocksPerReadableUnit");
+
+ b.Property("BufferUnderrunFreeInDVD");
+
+ b.Property("BufferUnderrunFreeInSAO");
+
+ b.Property("BufferUnderrunFreeInTAO");
+
+ b.Property("CPRMVersion");
+
+ b.Property("CSSVersion");
+
+ b.Property("CanAudioScan");
+
+ b.Property("CanEject");
+
+ b.Property("CanEraseSector");
+
+ b.Property("CanExpandBDRESpareArea");
+
+ b.Property("CanFormat");
+
+ b.Property("CanFormatBDREWithoutSpare");
+
+ b.Property("CanFormatCert");
+
+ b.Property("CanFormatFRF");
+
+ b.Property("CanFormatQCert");
+
+ b.Property("CanFormatRRM");
+
+ b.Property("CanGenerateBindingNonce");
+
+ b.Property("CanLoad");
+
+ b.Property("CanMuteSeparateChannels");
+
+ b.Property("CanOverwriteSAOTrack");
+
+ b.Property("CanOverwriteTAOTrack");
+
+ b.Property("CanPlayCDAudio");
+
+ b.Property("CanPseudoOverwriteBDR");
+
+ b.Property("CanReadAllDualR");
+
+ b.Property("CanReadAllDualRW");
+
+ b.Property("CanReadBD");
+
+ b.Property("CanReadBDR");
+
+ b.Property("CanReadBDRE1");
+
+ b.Property("CanReadBDRE2");
+
+ b.Property("CanReadBDROM");
+
+ b.Property("CanReadBluBCA");
+
+ b.Property("CanReadCD");
+
+ b.Property("CanReadCDMRW");
+
+ b.Property("CanReadCPRM_MKB");
+
+ b.Property("CanReadDDCD");
+
+ b.Property("CanReadDVD");
+
+ b.Property("CanReadDVDPlusMRW");
+
+ b.Property("CanReadDVDPlusR");
+
+ b.Property("CanReadDVDPlusRDL");
+
+ b.Property("CanReadDVDPlusRW");
+
+ b.Property("CanReadDVDPlusRWDL");
+
+ b.Property("CanReadDriveAACSCertificate");
+
+ b.Property("CanReadHDDVD");
+
+ b.Property("CanReadHDDVDR");
+
+ b.Property("CanReadHDDVDRAM");
+
+ b.Property("CanReadLeadInCDText");
+
+ b.Property("CanReadOldBDR");
+
+ b.Property("CanReadOldBDRE");
+
+ b.Property("CanReadOldBDROM");
+
+ b.Property("CanReadSpareAreaInformation");
+
+ b.Property("CanReportDriveSerial");
+
+ b.Property("CanReportMediaSerial");
+
+ b.Property("CanTestWriteDDCDR");
+
+ b.Property("CanTestWriteDVD");
+
+ b.Property("CanTestWriteInSAO");
+
+ b.Property("CanTestWriteInTAO");
+
+ b.Property("CanUpgradeFirmware");
+
+ b.Property("CanWriteBD");
+
+ b.Property("CanWriteBDR");
+
+ b.Property("CanWriteBDRE1");
+
+ b.Property("CanWriteBDRE2");
+
+ b.Property("CanWriteBusEncryptedBlocks");
+
+ b.Property("CanWriteCDMRW");
+
+ b.Property("CanWriteCDRW");
+
+ b.Property("CanWriteCDRWCAV");
+
+ b.Property("CanWriteCDSAO");
+
+ b.Property("CanWriteCDTAO");
+
+ b.Property("CanWriteCSSManagedDVD");
+
+ b.Property("CanWriteDDCDR");
+
+ b.Property("CanWriteDDCDRW");
+
+ b.Property("CanWriteDVDPlusMRW");
+
+ b.Property("CanWriteDVDPlusR");
+
+ b.Property("CanWriteDVDPlusRDL");
+
+ b.Property("CanWriteDVDPlusRW");
+
+ b.Property("CanWriteDVDPlusRWDL");
+
+ b.Property("CanWriteDVDR");
+
+ b.Property("CanWriteDVDRDL");
+
+ b.Property("CanWriteDVDRW");
+
+ b.Property("CanWriteHDDVDR");
+
+ b.Property("CanWriteHDDVDRAM");
+
+ b.Property("CanWriteOldBDR");
+
+ b.Property("CanWriteOldBDRE");
+
+ b.Property("CanWritePackedSubchannelInTAO");
+
+ b.Property("CanWriteRWSubchannelInSAO");
+
+ b.Property("CanWriteRWSubchannelInTAO");
+
+ b.Property("CanWriteRaw");
+
+ b.Property("CanWriteRawMultiSession");
+
+ b.Property("CanWriteRawSubchannelInTAO");
+
+ b.Property("ChangerIsSideChangeCapable");
+
+ b.Property("ChangerSlots");
+
+ b.Property("ChangerSupportsDiscPresent");
+
+ b.Property("DBML");
+
+ b.Property("DVDMultiRead");
+
+ b.Property("EmbeddedChanger");
+
+ b.Property("ErrorRecoveryPage");
+
+ b.Property("FirmwareDate");
+
+ b.Property("LoadingMechanismType");
+
+ b.Property("Locked");
+
+ b.Property("LogicalBlockSize");
+
+ b.Property("MultiRead");
+
+ b.Property("PhysicalInterfaceStandard");
+
+ b.Property("PhysicalInterfaceStandardNumber");
+
+ b.Property("PreventJumper");
+
+ b.Property("SupportsAACS");
+
+ b.Property("SupportsBusEncryption");
+
+ b.Property("SupportsC2");
+
+ b.Property("SupportsCPRM");
+
+ b.Property("SupportsCSS");
+
+ b.Property("SupportsDAP");
+
+ b.Property("SupportsDeviceBusyEvent");
+
+ b.Property("SupportsHybridDiscs");
+
+ b.Property("SupportsModePage1Ch");
+
+ b.Property("SupportsOSSC");
+
+ b.Property("SupportsPWP");
+
+ b.Property("SupportsSWPP");
+
+ b.Property("SupportsSecurDisc");
+
+ b.Property("SupportsSeparateVolume");
+
+ b.Property("SupportsVCPS");
+
+ b.Property("SupportsWriteInhibitDCB");
+
+ b.Property("SupportsWriteProtectPAC");
+
+ b.Property("VolumeLevels");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcFeatures");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.MmcSd", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CID");
+
+ b.Property("CSD");
+
+ b.Property("ExtendedCSD");
+
+ b.Property("OCR");
+
+ b.Property("SCR");
+
+ b.HasKey("Id");
+
+ b.ToTable("MmcSd");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Pcmcia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("CIS");
+
+ b.Property("CardCode");
+
+ b.Property("Compliance");
+
+ b.Property("Manufacturer");
+
+ b.Property("ManufacturerCode");
+
+ b.Property("ProductName");
+
+ b.HasKey("Id");
+
+ b.ToTable("Pcmcia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Scsi", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("InquiryData");
+
+ b.Property("ModeSense10Data");
+
+ b.Property("ModeSense6Data");
+
+ b.Property("ModeSenseId");
+
+ b.Property("MultiMediaDeviceId");
+
+ b.Property("ReadCapabilitiesId");
+
+ b.Property("SequentialDeviceId");
+
+ b.Property("SupportsModeSense10");
+
+ b.Property("SupportsModeSense6");
+
+ b.Property("SupportsModeSubpages");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModeSenseId");
+
+ b.HasIndex("MultiMediaDeviceId");
+
+ b.HasIndex("ReadCapabilitiesId");
+
+ b.HasIndex("SequentialDeviceId");
+
+ b.ToTable("Scsi");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiMode", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlankCheckEnabled");
+
+ b.Property("BufferedMode");
+
+ b.Property("DPOandFUA");
+
+ b.Property("MediumType");
+
+ b.Property("Speed");
+
+ b.Property("WriteProtected");
+
+ b.HasKey("Id");
+
+ b.ToTable("ScsiMode");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.ScsiPage", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ScsiId");
+
+ b.Property("ScsiModeId");
+
+ b.Property("page");
+
+ b.Property("subpage");
+
+ b.Property("value");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ScsiId");
+
+ b.HasIndex("ScsiModeId");
+
+ b.ToTable("ScsiPage");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.Ssc", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BlockSizeGranularity");
+
+ b.Property("MaxBlockLength");
+
+ b.Property("MinBlockLength");
+
+ b.HasKey("Id");
+
+ b.ToTable("Ssc");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SscSupportedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description");
+
+ b.Property("Length");
+
+ b.Property("MediumType");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Width");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SscSupportedMedia");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.SupportedDensity", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("BitsPerMm");
+
+ b.Property("Capacity");
+
+ b.Property("DefaultDensity");
+
+ b.Property("Description");
+
+ b.Property("Duplicate");
+
+ b.Property("Name");
+
+ b.Property("Organization");
+
+ b.Property("PrimaryCode");
+
+ b.Property("SecondaryCode");
+
+ b.Property("SscId");
+
+ b.Property("TestedSequentialMediaId");
+
+ b.Property("Tracks");
+
+ b.Property("Width");
+
+ b.Property("Writable");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SscId");
+
+ b.HasIndex("TestedSequentialMediaId");
+
+ b.ToTable("SupportedDensity");
+ });
+
+ modelBuilder.Entity("DiscImageChef.CommonTypes.Metadata.TestedMedia", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AtaId");
+
+ b.Property("BlockSize");
+
+ b.Property("Blocks");
+
+ b.Property("CHSId");
+
+ b.Property("CanReadAACS");
+
+ b.Property("CanReadADIP");
+
+ b.Property("CanReadATIP");
+
+ b.Property("CanReadBCA");
+
+ b.Property("CanReadC2Pointers");
+
+ b.Property("CanReadCMI");
+
+ b.Property("CanReadCorrectedSubchannel");
+
+ b.Property("CanReadCorrectedSubchannelWithC2");
+
+ b.Property("CanReadDCB");
+
+ b.Property("CanReadDDS");
+
+ b.Property("CanReadDMI");
+
+ b.Property("CanReadDiscInformation");
+
+ b.Property