private async Task <GetFCMomentResponse> PrepareMomentForResponse(FCMoment momentInfo) { momentInfo.InUse = true; await fcMomentsRepository.UpdateAsync(momentInfo); var amLogs = await fcMomentAMLogRepository.GetRangeByMomentIdAsync(momentInfo.Id); SubscribeToReopenAudio(momentInfo.Id); return(new GetFCMomentResponse { NextAmsPredictionModel = mapper.Map <FCMomentModel>(momentInfo), AudioMessageLogs = mapper.Map <FCMomentAMLogModel[]>(amLogs) }); }
public Task UpdateAsync(FCMoment item) { fcMomentDataSet.Update(item); return(dbContext.SaveChangesAsync()); }