4

The documentation on the AddAsync method states that

This method is async only to allow special value generators, such as the one used by 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', to access the database asynchronously. For all other cases the non async method should be used.

Is this still up to date, as the method does return a ValueTask and thus, in the synchronous way there should be no further Task-related allocations?

Update / Follow-up question

Why does AddRangeAsync not return a ValueTask (Documentation)?

0xDECAFBAD
  • 627
  • 1
  • 8
  • 21

0 Answers0