public void LoadCpus() { var cpusList = ReadCpusCsv("Cpus.csv"); SqliteRepositoryBase.FileNameInternal = "benchmarks.sqlite3"; var cpuRepository = new CpuRepository(); foreach (var cpuItem in cpusList) { var cpu = new Cpu() { Manufacturer = cpuItem["Vendor"], Model = cpuItem["Model"], Category = cpuItem["Architecture"], Specs = new CommonSpecs() { Cores = 1, Threads = 1 } }; cpuRepository.Create(cpu); } }
public void Test1() { SqliteRepositoryBase.FileNameInternal = "benchmarks.sqlite3"; var cpuRepository = new CpuRepository(); var cpu = new Cpu() { Manufacturer = "Intel", Model = "Core i7 2600", Category = "x86" }; cpuRepository.Create(cpu); }
private void CpuAddItem_Click(object sender, RoutedEventArgs e) { try { var redactor = new CPURedactor(); if (redactor.ShowDialog() == true) { //CpuRepository repository = new CpuRepository(_connectionString); cpuRepository.Create(redactor.curCPU); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }