Fix build in netcoreapp21

This commit is contained in:
nicolas.dorier 2019-10-06 18:47:49 +09:00
parent 3bdc7c102a
commit 78b86ce0ea
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 7 additions and 1 deletions

View file

@ -46,7 +46,7 @@ namespace BTCPayServer.Tests
formFile.ContentDisposition = $"form-data; name=\"file\"; filename=\"{fileInfo.Name}\"";
return formFile;
}
public static void Eventually(Action act, int ms = 200000)
public static void Eventually(Action act, int ms = 20_000)
{
CancellationTokenSource cts = new CancellationTokenSource(ms);
while (true)

View file

@ -86,12 +86,18 @@ retry:
using (var db = _ContextFactory.CreateContext())
{
return (await db.AddressInvoices
#if !NETCOREAPP21
.Include(a => a.InvoiceData.Payments)
.Include(a => a.InvoiceData.RefundAddresses)
#endif
#pragma warning disable CS0618
.Where(a => addresses.Contains(a.Address))
#pragma warning restore CS0618
.Select(a => a.InvoiceData)
#if NETCOREAPP21
.Include(a => a.Payments)
.Include(a => a.RefundAddresses)
#endif
.ToListAsync()).Select(ToEntity);
}
}