Skip to content

ExportFullDatabase doesn’t populate CriticProvider (and will export it as an empty column), while ImportFullDatabase expects/uses record.CriticProvider. This causes data loss on export→import roundtrips; populate CriticProvider (and any other persisted game fields you intend to roundtrip) in the FullExportModel creation here. #6

@David-H-Afonso

Description

@David-H-Afonso

ExportFullDatabase doesn’t populate CriticProvider (and will export it as an empty column), while ImportFullDatabase expects/uses record.CriticProvider. This causes data loss on export→import roundtrips; populate CriticProvider (and any other persisted game fields you intend to roundtrip) in the FullExportModel creation here.

                allRecords.Add(new FullExportModel
                {
                    Type = "Game",
                    Name = g.Name,
                    Status = g.Status?.Name ?? "",
                    Platform = g.Platform?.Name ?? "",
                    PlayWith = playWithNames,
                    PlayedStatus = g.PlayedStatus?.Name ?? "",
                    Released = g.Released ?? "",
                    Started = g.Started ?? "",
                    Finished = g.Finished ?? "",
                    Score = g.Score?.ToString() ?? "",
                    Critic = g.Critic?.ToString() ?? "",
                    CriticProvider = g.CriticProvider ?? "",
                    Grade = g.Grade?.ToString() ?? "",
                    Completion = g.Completion?.ToString() ?? "",
                    Story = g.Story?.ToString() ?? "",
                    Comment = g.Comment ?? "",
                    Logo = g.Logo ?? "",
                    Cover = g.Cover ?? "",
                    IsCheaperByKey = g.IsCheaperByKey?.ToString() ?? "",
                    KeyStoreUrl = g.KeyStoreUrl ?? ""
                });

Originally posted by @Copilot in #5 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions