#43 fixing GanjoorAudioId

This commit is contained in:
Hamid Reza Mohammadi 2020-11-26 10:33:05 +03:30
parent b2cda2e7fe
commit d7e4ebc760

View File

@ -1055,7 +1055,14 @@ namespace RMuseum.Services.Implementation
))
{
await connection.OpenAsync();
await connection.ExecuteAsync(sql);
using(MySqlCommand cmd = new MySqlCommand(sql, connection))
{
await cmd.ExecuteNonQueryAsync();
int AudioId = (int)cmd.LastInsertedId;
narration.GanjoorAudioId = AudioId;
context.Recitations.Update(narration);
await context.SaveChangesAsync();
}
}
tracker.FirstDbUpdated = true;