/// <summary> /// Tries to find a referencing entity with the given <paramref name="id" />. /// </summary> /// <param name="id"></param> /// <returns></returns> public TEntity FindEntity(int id) { var entity = ReferencingGroup.FindEntity(id); if (entity != null && ContainsEntity(entity)) { return(entity); } return(null); }
/// <summary> /// Returns <c>true</c> if there is a referencing entity with the given <paramref name="id" />. /// </summary> /// <param name="id"></param> /// <returns></returns> public bool ContainsEntity(int id) { var entity = ReferencingGroup.FindEntity(id); return(entity != null && ContainsEntity(entity)); }