public void Apply(object obj) { var boardCollection = obj as BoardCollection; if (boardCollection == null) { return; } boardCollection.Links = new List <Link> { new Link { Rel = Link.SELF, Href = linkFactory.Build("BoardSearch", new {}) } }; if (boardCollection.Items == null) { return; } foreach (var board in boardCollection.Items) { boardState.Apply(board); } }