protected List <dynamic> GetCommonEntitiesinBatch() { List <dynamic> entities = new List <dynamic>(); for (int i = 0; i < this.WriteBatchSize; i++) { entities.Add(EntityV2.getRandomEntity()); } return(entities); }
public static EntityV2 getRandomEntity() { var entity = new EntityV2(); entity.SuperId = RandomNumberGenerator.GetNext(); entity.id = Guid.NewGuid().ToString(); entity.FullName = "Test Sample Name " + entity.SuperId.ToString(); entity.Description = "Test Sample Description " + entity.SuperId.ToString(); entity.EntityType = RandomNumberGenerator.GetRandomEntityType(); var employeeid = RandomNumberGenerator.GetNext(); entity.EmailAddress = "intialTest" + employeeid.ToString() + "@test.com"; entity.PhoneNumber = RandomNumberGenerator.GetNext().ToString(); entity.IsActive = true; entity.ModifiedTime = DateTime.UtcNow; entity.BaseKeys = new List <EntityKey>(); entity.BaseKeys.Add(EntityKey.getRandomEntityKey()); entity.BaseKeys.Add(EntityKey.getRandomEntityKey()); entity.BaseKeys.Add(EntityKey.getRandomEntityKey()); entity.BaseKeys.Add(EntityKey.getRandomEntityKey()); entity.BaseKeys.Add(EntityKey.getRandomEntityKey()); return(entity); }