public static async Task <bool> IsSubscribedToAsync(this IIdentity identity, int noticeBoardId) { var id = identity.GetUserId(); using (RelationshipManager rm = new RelationshipManager()) { if (await rm.ExistsAsync(new UserNoticeBoardFollow { NoticeBoardId = noticeBoardId, UserId = id })) { return(true); } return(false); } }