public async Task <int> SaveStoredFormatAsync(StoredFormat storedFormat)
        {
            List <StoredFormat> formats = await GetStoredFormatsWithSamePrinterPathAsync(storedFormat);

            foreach (StoredFormat format in formats)
            {
                await DeleteStoredFormatByIdAsync(format.Id);
            }

            if (storedFormat.Id != 0)
            {
                return(await database.UpdateAsync(storedFormat));
            }
            else
            {
                return(await database.InsertAsync(storedFormat));
            }
        }
        public async Task <List <StoredFormat> > GetStoredFormatsWithSamePrinterPathAsync(StoredFormat storedFormat)
        {
            string query = $"SELECT * FROM {StoredFormatTableName} WHERE {nameof(StoredFormat.DriveLetter)} = ? AND {nameof(StoredFormat.Name)} = ? AND {nameof(StoredFormat.Extension)} = ? ORDER BY {nameof(StoredFormat.DriveLetter)} ASC, {nameof(StoredFormat.Name)} ASC, {nameof(StoredFormat.Extension)} ASC";

            return(await database.QueryAsync <StoredFormat>(query, storedFormat.DriveLetter, storedFormat.Name, storedFormat.Extension));
        }