I use Resharper 7, and sometimes when I write foreach loops, it means that I convert it to LINQ. The problem is that I cannot find a parameter where I can choose that LINQ is created using extension methods, and not in the LINQ query form.
I know that this should be possible, because earlier it was used with my old settings (I had to return them to default, because for some reason they completely broke).
This is the foreach loop:
var idList= new List<string>(); foreach (var entity in entityList) { if(entity.EntityPathOrNull==null) idList.Add(entity.Identity); }
Here's how it is converted:
var idList = (from entity in entityList where entity.EntityPathOrNull == null select entity.Identity).ToList();
And this is how I want it to look like this:
var idList = entityList.Where(entity => entity.EntityPathOrNull == null).Select(entity=> entity.Identity).ToList();
Question: Does anyone know where this parameter is? I searched and google everywhere, but could not find it.
source share