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); }