From fd3aacf010aceee829214b038477db7f440764c8 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Tue, 11 Apr 2023 14:35:48 +0330 Subject: [PATCH] docs: #379 #380 filling new fields GanjoorCatViewModel --- .../Ganjoor/ViewModels/GanjoorCatViewModel.cs | 5 ----- RMuseum/RMuseum.xml | 5 ----- .../Services/Implementation/GanjoorService.cs | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/RMuseum/Models/Ganjoor/ViewModels/GanjoorCatViewModel.cs b/RMuseum/Models/Ganjoor/ViewModels/GanjoorCatViewModel.cs index 0b531441..d514b094 100644 --- a/RMuseum/Models/Ganjoor/ViewModels/GanjoorCatViewModel.cs +++ b/RMuseum/Models/Ganjoor/ViewModels/GanjoorCatViewModel.cs @@ -64,11 +64,6 @@ namespace RMuseum.Models.Ganjoor.ViewModels /// public string BookName { get; set; } - /// - /// poet image - /// - public virtual RImage RImage { get; set; } - /// /// user image id /// diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index d3e2647f..58195093 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -8953,11 +8953,6 @@ category book name - - - poet image - - user image id diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index b5bfbc73..24181f87 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -202,6 +202,10 @@ namespace RMuseum.Services.Implementation DescriptionHtml = parent.DescriptionHtml, MixedModeOrder = parent.MixedModeOrder, Published = parent.Published, + BookName = parent.BookName, + RImageId = parent.RImageId, + SumUpSubsGeoLocations = parent.SumUpSubsGeoLocations, + MapName = parent.MapName, }); parent = await _context.GanjoorCategories.Where(c => c.Id == parent.ParentId).AsNoTracking().FirstOrDefaultAsync(); @@ -231,6 +235,10 @@ namespace RMuseum.Services.Implementation DescriptionHtml = c.DescriptionHtml, MixedModeOrder = c.MixedModeOrder, Published = c.Published, + BookName = c.BookName, + RImageId = c.RImageId, + SumUpSubsGeoLocations = c.SumUpSubsGeoLocations, + MapName = c.MapName, //other fields null } ).AsNoTracking().SingleOrDefaultAsync(); @@ -258,6 +266,10 @@ namespace RMuseum.Services.Implementation DescriptionHtml = c.DescriptionHtml, MixedModeOrder = c.MixedModeOrder, Published = c.Published, + BookName = c.BookName, + RImageId = c.RImageId, + SumUpSubsGeoLocations = c.SumUpSubsGeoLocations, + MapName = c.MapName, //other fields null } ).AsNoTracking().SingleOrDefaultAsync(); @@ -274,6 +286,10 @@ namespace RMuseum.Services.Implementation DescriptionHtml = cat.DescriptionHtml, MixedModeOrder = cat.MixedModeOrder, Published = cat.Published, + BookName = cat.BookName, + RImageId = cat.RImageId, + SumUpSubsGeoLocations = cat.SumUpSubsGeoLocations, + MapName = cat.MapName, Next = nextCat, Previous = preCat, Ancestors = ancetors,