bug fix for AudioOrder

This commit is contained in:
Hamid Reza Mohammadi 2020-11-26 18:39:13 +03:30
parent bab899da58
commit 32e66fda7e

View File

@ -22,7 +22,7 @@ using System.Linq;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace RMuseum.Services.Implementation
namespace RMuseum.Services.Implementationa
{
/// <summary>
@ -815,7 +815,7 @@ namespace RMuseum.Services.Implementation
GanjoorPostId = audio.PoemId,
OwnerId = session.UseId,
GanjoorAudioId = 1 + await context.Recitations.OrderByDescending(a => a.GanjoorAudioId).Select(a => a.GanjoorAudioId).FirstOrDefaultAsync(),
AudioOrder = 1 + await context.Recitations.Where(a => a.GanjoorPostId == audio.PoemId).OrderByDescending(a => a.GanjoorAudioId).Select(a => a.AudioOrder).FirstOrDefaultAsync(),
AudioOrder = 1 + await context.Recitations.Where(a => a.GanjoorPostId == audio.PoemId).OrderByDescending(a => a.AudioOrder).Select(a => a.AudioOrder).FirstOrDefaultAsync(),
FileNameWithoutExtension = fileNameWithoutExtension,
SoundFilesFolder = currentTargetFolder,
AudioTitle = string.IsNullOrEmpty(audio.PoemTitle) ? audio.Description : audio.PoemTitle,