diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_CourseWare.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_CourseWare.Dto.View.cs index bda4e806..32396dbd 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_CourseWare.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_CourseWare.Dto.View.cs @@ -38,4 +38,6 @@ public class Ghre_CourseWareDto : Ghre_CourseWare public List Attachments { get; set; } public string StudyDuration { get; set; } public string SourceLabel { get; set; } + + public List Courses { get; set; } } diff --git a/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs index ebdcd7ff..3e4c51f3 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CourseWareServices.cs @@ -85,6 +85,8 @@ public class Ghre_CourseWareServices : BaseServices(); result.result.DT_TableDataT1[0].Attachments = await _ghre_CourseWareAttachmentServices.Query(x => x.CourseWareId == body.id); + var IDS = result.result.DT_TableDataT1[0].CourseIds2; + result.result.DT_TableDataT1[0].Courses = await _ghre_CourseServices.Query(x => IDS.Contains(x.Id)); if (body.doType == "Copy") {