methods like .AddRange, .AddRangeAsync, .AttachRange, .RemoveRange, .UpdateRange should have [InstantHandle] annotation for their collection parameters.
Note that similar methods in non-netcore ef should be annotated as well.
Due to lack of these annotations R#/Rider currently issue incorrect access to modified closure warnings in code like this:
https://www.entityframeworktutorial.net/efcore/entity-framework-core-dbcontext.aspx
methods like
.AddRange
,.AddRangeAsync
,.AttachRange
,.RemoveRange
,.UpdateRange
should have[InstantHandle]
annotation for their collection parameters.Note that similar methods in non-netcore ef should be annotated as well.
Due to lack of these annotations R#/Rider currently issue incorrect
access to modified closure
warnings in code like this: