using System.Collections.Generic;
public class CustomerSearchIndexEntity {
public const string DefaultPartitionKey = "0";
public Guid CustomerGuid { get; set; }
public string ElasticClusterId { get; set; }
public int SearchIndexDataType { get; set; }
public string IndexName { get; set; }
public string RowKey { get; set; }
public enum SearchIndexDataType{
public static void Main()
var indexNameMapping = new Dictionary<SearchIndexDataType, string>(){
{ SearchIndexDataType.InvoiceCreditNote, "dev-invcrd" },
{ SearchIndexDataType.TenancySchedule, "dev-tenancy" },
{ SearchIndexDataType.Other, "dev-other" },
var customerGuidList = new List<Guid>(){ Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid(), Guid.NewGuid() };
var customerSearchIndexEntityList = new List<CustomerSearchIndexEntity>( );
for ( var i = 0; i < customerGuidList.Count; i++ )
var searchIndexDataType = (SearchIndexDataType)iterationIndex;
var indexName = indexNameMapping.ContainsKey(searchIndexDataType) ? indexNameMapping[searchIndexDataType] : "None";
customerSearchIndexEntityList.Add(new CustomerSearchIndexEntity
RowKey = $"{searchIndexDataType}_{customerGuidList[ i ]}",
SearchIndexDataType = (int)searchIndexDataType,
CustomerGuid = customerGuidList[ i ],
ElasticClusterId = "CLUSTER",
if(iterationIndex >= SearchIndexDataType.GetNames<SearchIndexDataType>().Length-1){
foreach(var indexEntity in customerSearchIndexEntityList){
Console.WriteLine("RowKey: " + indexEntity.RowKey);
Console.WriteLine("RowIndexDataType: " + indexEntity.SearchIndexDataType);
Console.WriteLine("CustomerGuid: " + indexEntity.CustomerGuid);
Console.WriteLine("ElasticClusterId: " + indexEntity.ElasticClusterId);
Console.WriteLine("IndexName: " + indexEntity.IndexName);