To call GetTypes , entities will need to be evaluated in terms of ReSharper (he does not know if GetTypes require numbering to be evaluated, so it says "multiple enumeration is possible"). Since ReSharper sees that there are several places in this method where you have the same script, it generates this warning.
This may or may not be a problem, depending on what constitutes entities and what operation you perform on it. If it is an array in memory or you are performing an operation that does not iterate through the list, there is nothing to worry about. If you reprogram it and represent a query that will be sent to the database, it is probably useful to list it explicitly (by calling ToList or ToArray ) and acting on the result of this.
source share