WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
16 stars 3 forks source link

WI00578319 - Add code fix to WTG4001 #203

Closed andrewhongnsw closed 1 year ago

brian-reichle commented 1 year ago

The reason we didn't add a code fix for this is because in most cases the correct fix is more involved than simply adding .AsEnumerable() (eg. encoding the filter into the query expression rather than using a delegate). Using .AsEnumerable() is really only a workaround for the cases where it's desirable to fetch all the records and perform the operation locally.

andrewhongnsw commented 1 year ago

Ok will close the PR, thanks for reviewing it