public int UpdateCSVFileVersion(CSVFileVersion versionInfo)
        {
            var updatedRows = 0;

            using (IDbConnection conn = new SQLiteConnection(GlobalDataVars.SQLiteConnectionString))
            {
                var commandString = $"UPDATE FileVersions SET Version = @Version WHERE FileName = @FileName";
                updatedRows += conn.Execute(commandString, new { Version = versionInfo.Version, FileName = versionInfo.FileName });
            }

            return(updatedRows);
        }
Ejemplo n.º 2
0
        private bool CheckForUpdate(string file, CSVFileVersion fileVersion)
        {
            var dbVersion = _csvFileVersionsRepository.GetCSVFileVersion(file);

            return(fileVersion.Version != dbVersion.Version);
        }