I have a property OnHomePage
which is a bool.
I am trying to set this value based on whether a result is returned from a linq query or not. Obviously I could write an external method to determine whether the result of my query is null or whether it holds a value but I am hoping there is a better way for it to be done in one line.
Here is my current line of code as it stands:
OnHomePage = im.PageImages.Select(p => p.ImageId == im.Id
&& p.Page.PageName == "/Home")