/// <summary> /// Creates a new instance of this entity sets entity type /// </summary> /// <param name="add">If true, adds the new entity to the entity set</param> /// <returns>A new instance of this entity sets entity type</returns> TEntity IEntitySet <TEntity> .CreateNew(bool add) { var entity = _entitySet.CreateNew(add); if (add) { _data.Add(entity); } return(entity); }