docs: #306 updating masnvi verses

This commit is contained in:
Hamid Reza Mohammadi 2022-04-14 09:32:43 +04:30
parent b6c89640ed
commit f3d5fc0826

View File

@ -622,6 +622,9 @@ namespace RMuseum.Services.Implementation
PlainText = verseSection.PlainText
};
context.Add(secondVerseSection);
rightVerse.ThirdSectionIndex = secondVerseSection.Index;
leftVerse.ThirdSectionIndex = secondVerseSection.Index;
}
if (!string.IsNullOrEmpty(pageData.Rhythm3))
@ -654,11 +657,14 @@ namespace RMuseum.Services.Implementation
PlainText = verseSection.PlainText
};
context.Add(thirdVerseSection);
rightVerse.ForthSectionIndex = thirdVerseSection.Index;
leftVerse.ForthSectionIndex = thirdVerseSection.Index;
}
}
context.UpdateRange(nonCommentVerses);
await context.SaveChangesAsync();
var newCoupletSections = await context.GanjoorPoemSections.Where(s => s.PoemId == id && s.SectionType == PoemSectionType.Couplet).ToListAsync();
_backgroundTaskQueue.QueueBackgroundWorkItem
@ -682,10 +688,6 @@ namespace RMuseum.Services.Implementation
}
}
}
await context.SaveChangesAsync();
CacheCleanForPageByUrl(dbPage.FullUrl);