Getting Items by Content Picker Id

Topics: Customizing Orchard
Mar 6 at 8:09 AM
Edited Mar 6 at 8:10 AM
Hi There

I have to contentItems ContentA and ContentB

ContentA has a content picker field where I add contentB to it.

I have a view displaying contentB what I want is a list of all the contentA,s that have contentB added to it.
var ContentB= Model.ContentItem;
    var contentManager = WorkContext.Resolve<IContentManager>();
    var contentblist= contentManager.Query("ContentA").Where(x => x.contentpickerfield.Id == ContentB.Id);
I want to do something like the code above but as it is in a view im struggling with the properties.

Any ideas