Skip to content

inappropriate VSTHRD103 on EntityFrameworkCore's AddRange(Async) methods #584

Closed

Description

DbContext and DbSet<TEntity> both contain AddRange+AddRangeAsync pairs but the documentation on all overloads states that AddRangeAsync should rarely ever been used:

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.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbset-1.addrangeasync?view=efcore-3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions