我有一个下面的 lambda,它运行下面列出的方法头,我遇到的问题是我必须添加另一个等待调用,以便我能够检索 der 中的实际列表,以便我处理其中的一些详细信息。所以在运行时我遇到了这个问题
Models.Entities.Listing
列表未定义
public async Task<Microsoft.AspNetCore.Mvc.ActionResult> PostBatchEvents([FromBody] BatchEventRequest[] request)
{
var batchRe
/// isuue starts here
sults = await _messagePublisher.BatchPublishMessages(request.Select( x =>
(x.EventId ?? Guid.NewGuid(), x.ListingId, x.EventType.ToString(), await _messagePublisher.GetListingMessagingProcess(x.ListingId), x.PublishedDate)));
return await Task.FromResult(Ok(response));
}
我有以下方法前往
public async Task<IEnumerable<List<(bool Success, string EventId, int ListingId, string EventType, string FailureMessage) >>> BatchPublishMessages(
IEnumerable<(Guid EventId, int ListingId, string EventType, Models.Entities.Listing listing, DateTime? publishedDate)> events)
我想知道等待每个详细信息返回然后处理该元组中的请求的最佳方法是什么。