diff --git a/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/.suo b/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/.suo index 5090352..b2e8168 100644 Binary files a/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/.suo and b/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/.suo differ diff --git a/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/DocumentLayout.json b/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/DocumentLayout.json index efc839c..57d2bf2 100644 --- a/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/DocumentLayout.json +++ b/Projekt_Calcan_Conze/.vs/Projekt_Calcan_Conze/v17/DocumentLayout.json @@ -2,57 +2,9 @@ "Version": 1, "WorkspaceRootPath": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\", "Documents": [ - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\dtos\\userattributedto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\dtos\\userattributedto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\dtos\\userdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\dtos\\userdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\dtos\\useridentifierdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\dtos\\useridentifierdto.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\models\\address.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\models\\address.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\models\\phonenumber.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\models\\phonenumber.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\models\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\repositories\\database.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\repositories\\database.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\importusers.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\importusers.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{44DD7752-6BB5-4C3A-9053-671D8ADE49C4}|Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Import.csproj|solutionrelative:projekt_calcan_conze\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze_export\\models\\billing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|solutionrelative:projekt_calcan_conze_export\\models\\billing.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze_export\\repositories\\database.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|solutionrelative:projekt_calcan_conze_export\\repositories\\database.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\projekt_calcan_conze_export\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{9E018F4D-EED3-44D0-9179-E6637B984D74}|Projekt_Calcan_Conze_Export\\Projekt_Calcan_Conze_Export.csproj|solutionrelative:projekt_calcan_conze_export\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{1A945077-A135-4756-974C-A87109DF411E}|Core\\Core.csproj|c:\\jan_bib_module\\pmc\\projekt\\projekt_calcan_conze\\core\\constants.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{1A945077-A135-4756-974C-A87109DF411E}|Core\\Core.csproj|solutionrelative:core\\constants.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -67,170 +19,14 @@ { "$type": "Document", "DocumentIndex": 0, - "Title": "UserAttributeDto.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserAttributeDto.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\DTOs\\UserAttributeDto.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserAttributeDto.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\DTOs\\UserAttributeDto.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAwAAAAmAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:57.118Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 1, - "Title": "UserDto.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserDto.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\DTOs\\UserDto.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserDto.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\DTOs\\UserDto.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:55.645Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 2, - "Title": "UserIdentifierDto.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserIdentifierDto.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\DTOs\\UserIdentifierDto.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\DTOs\\UserIdentifierDto.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\DTOs\\UserIdentifierDto.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:54.005Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 3, - "Title": "Address.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\Address.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\Models\\Address.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\Address.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\Models\\Address.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:50.109Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 4, - "Title": "PhoneNumber.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\PhoneNumber.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\Models\\PhoneNumber.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\PhoneNumber.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\Models\\PhoneNumber.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:48.238Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 5, - "Title": "User.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\User.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\Models\\User.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Models\\User.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\Models\\User.cs", - "ViewState": "AgIAAG4AAAAAAAAAAAAUwAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:44.206Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 6, - "Title": "Database.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Repositories\\Database.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\Repositories\\Database.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Repositories\\Database.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\Repositories\\Database.cs", - "ViewState": "AgIAABwBAAAAAAAAAAAgwBMAAAAJAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:25.505Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 7, - "Title": "ImportUsers.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\ImportUsers.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\ImportUsers.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\ImportUsers.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\ImportUsers.cs", - "ViewState": "AgIAAMEAAAAAAAAAAAAkwAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:09.63Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 8, - "Title": "Program.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Program.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze\\Program.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze\\Program.cs", - "RelativeToolTip": "Projekt_Calcan_Conze\\Program.cs", - "ViewState": "AgIAAEIAAAAAAAAAAAAAAAsAAAA7AAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:46:05.624Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 9, - "Title": "Billing.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Models\\Billing.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze_Export\\Models\\Billing.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Models\\Billing.cs", - "RelativeToolTip": "Projekt_Calcan_Conze_Export\\Models\\Billing.cs", - "ViewState": "AgIAAFQAAAAAAAAAAAAIwE4AAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:45:53.86Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 10, "Title": "Database.cs", "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Repositories\\Database.cs", "RelativeDocumentMoniker": "Projekt_Calcan_Conze_Export\\Repositories\\Database.cs", "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Repositories\\Database.cs", "RelativeToolTip": "Projekt_Calcan_Conze_Export\\Repositories\\Database.cs", - "ViewState": "AgIAABkAAAAAAAAAAAAQwCoAAABVAAAAAAAAAA==", + "ViewState": "AgIAAI4AAAAAAAAAAAAQwJgAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:42:22.05Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 11, - "Title": "Program.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Program.cs", - "RelativeDocumentMoniker": "Projekt_Calcan_Conze_Export\\Program.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Projekt_Calcan_Conze_Export\\Program.cs", - "RelativeToolTip": "Projekt_Calcan_Conze_Export\\Program.cs", - "ViewState": "AgIAADkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:42:17.08Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 12, - "Title": "Constants.cs", - "DocumentMoniker": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Core\\Constants.cs", - "RelativeDocumentMoniker": "Core\\Constants.cs", - "ToolTip": "C:\\Jan_bib_Module\\PMC\\Projekt\\Projekt_Calcan_Conze\\Core\\Constants.cs", - "RelativeToolTip": "Core\\Constants.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAA2AAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2024-09-02T16:39:23.872Z", + "WhenOpened": "2024-09-02T18:06:03.752Z", "EditorCaption": "" } ] diff --git a/Projekt_Calcan_Conze/Projekt_Calcan_Conze_Export/Repositories/Database.cs b/Projekt_Calcan_Conze/Projekt_Calcan_Conze_Export/Repositories/Database.cs index 7d769ff..fac00f5 100644 --- a/Projekt_Calcan_Conze/Projekt_Calcan_Conze_Export/Repositories/Database.cs +++ b/Projekt_Calcan_Conze/Projekt_Calcan_Conze_Export/Repositories/Database.cs @@ -126,21 +126,24 @@ internal static class Database // set wasBilled to 1 for all retrieved activities - string activityIdsString = string.Join(',', activityIds.Select((_, i) => $"@activityId{i}")); - var updateWasBilledCommand = - new MySqlCommand - { - Connection = dbConnection, - Transaction = transaction, - CommandText = $"UPDATE activity SET wasBilled = 1 WHERE id IN ({activityIdsString})" - }; - - for (int i = 0; i < activityIds.Count; i++) + if (activityIds.Any()) { - updateWasBilledCommand.Parameters.AddWithValue($"@activityId{i}", activityIds[i]); - } + string activityIdsString = string.Join(',', activityIds.Select((_, i) => $"@activityId{i}")); + var updateWasBilledCommand = + new MySqlCommand + { + Connection = dbConnection, + Transaction = transaction, + CommandText = $"UPDATE activity SET wasBilled = 1 WHERE id IN ({activityIdsString})" + }; - await updateWasBilledCommand.ExecuteNonQueryAsync(); + for (int i = 0; i < activityIds.Count; i++) + { + updateWasBilledCommand.Parameters.AddWithValue($"@activityId{i}", activityIds[i]); + } + + await updateWasBilledCommand.ExecuteNonQueryAsync(); + } } catch (Exception) {