From 3fd5ca0154e8802e0af9c344be92e4d484711f04 Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Sun, 22 Nov 2020 19:56:02 +0100 Subject: [PATCH] API: Include ImageId list in case --- CoviDok/Data/MySQL/MySqlCaseHandler.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CoviDok/Data/MySQL/MySqlCaseHandler.cs b/CoviDok/Data/MySQL/MySqlCaseHandler.cs index 99acc65..0a68981 100644 --- a/CoviDok/Data/MySQL/MySqlCaseHandler.cs +++ b/CoviDok/Data/MySQL/MySqlCaseHandler.cs @@ -34,7 +34,12 @@ namespace CoviDok.Data.MySQL public List GetUpdatesForCase(int id) { - return (from u in context.Updates where u.CaseId == id select u).ToList(); + List updates = (from u in context.Updates where u.CaseId == id select u).ToList(); + foreach (Update update in updates) + { + update.Images = (from i in context.Images where i.UpdateId == update.Id select i.ImageId).ToList(); + } + return updates; } public Update GetUpadte(int id)