/// <summary> /// Find Entity /// </summary> /// <param name="entityFinder"></param> /// <returns></returns> public EntityListReadOnly <T> FindEntities(EntityFinder entityFinder) { EntityListReadOnly <T> returnValue = new EntityListReadOnly <T>(); this.FindAll(returnValue, entityFinder, PredicateForEntityFinder); return(returnValue); }
/// <summary> /// Clone an entity list by creating a new entity list, and cloning all list members. /// </summary> public virtual object Clone() { EntityListReadOnly <T> newEntityList = new EntityListReadOnly <T>(); foreach (ICloneable entity in this) { newEntityList.Add((T)entity.Clone()); } return(newEntityList); }
/// <summary> /// Find Entity /// </summary> /// <param name="entityFinder"></param> /// <returns></returns> public T FindEntity(EntityFinder entityFinder) { T returnValue = null; EntityListReadOnly <T> entityListReadOnly = this.FindEntities(entityFinder); if (entityListReadOnly.Count > 0) { returnValue = entityListReadOnly[0]; } return(returnValue); }