/// <summary> /// Adds a single Index Definition to the current <see cref="TableContext{TDomainEntity}"/>. /// </summary> /// <param name="tableIndexDefinition"></param> public void AddIndexDefinition(TableIndexDefinition <TDomainEntity> tableIndexDefinition) { if (IndexDefinitions.Any(indexDef => indexDef.IndexNameKey == tableIndexDefinition.IndexNameKey)) { return; } IndexDefinitions.Add(tableIndexDefinition); }
/// <summary> /// Adds multiple Index Definitions types to the current <see cref="TableContext{TDomainEntity}"/>. /// </summary> /// <param name="indexDefinitions"></param> public void AddMultipleIndexDefinitions(List <TableIndexDefinition <TDomainEntity> > indexDefinitions) { foreach (var indexDefinition in indexDefinitions) { if (IndexDefinitions.Any(indexDef => indexDef.IndexNameKey == indexDefinition.IndexNameKey)) { continue; } IndexDefinitions.Add(indexDefinition); } }