Rock.Model.PersonViewedService.GetByViewerPersonId C# (CSharp) Method

GetByViewerPersonId() public method

Returns an enumerable collection of Rock.Model.PersonViewed entities by the Id of the Viewer Rock.Model.Person.
public GetByViewerPersonId ( int viewerPersonId ) : IEnumerable
viewerPersonId int A representing the Id of the Viewer
return IEnumerable
        public IEnumerable<PersonViewed> GetByViewerPersonId( int? viewerPersonId )
        {
            return Queryable().Where( t => ( t.ViewerPersonAlias != null && t.ViewerPersonAlias.PersonId == viewerPersonId ) || ( viewerPersonId == null && t.ViewerPersonAlias == null ) );
        }