I have a list of photos and a list of Albums. I created one single List of type object to combine them. Now I'm trying to use LINQ so that I can retrieve albums based on userId and the photos contained inside the album.
Could anyone help me in understanding how to retrieve the above?
I'm using LINQPAD in order to do that, so I will attach a photo here.

You can not access the property from
objecttype (Unless you use Reflection to get property value in c#). So that is the reason why you are getting the error.If you want to retrieve albums based on userId and the photos contained inside the album, you can use
linq to objectlike belowYou can also create one class to store your value like below