public static EntityEntity CreateEntity()
		{
			EntityRepository repository = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName);
			EntityEntity entity = EntityData.GetItemForInsert();
			//repository.ClearCollection();

			entity = repository.Create(entity);

			return entity;
		}
		public void ShouldThrowArgumentNullExceptionOnConstructor()
		{
			// Act
			try
			{
				EntityRepository repository = new EntityRepository(null);
				Assert.Fail("This should not happen");
			}
			catch (Exception ex)
			{
				// Arrange
				Assert.IsInstanceOf<ArgumentNullException>(ex);
			}
		}
		private static void CreateEntities()
		{
			EntityRepository repository = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName);

			EntityEntity entity = new EntityEntity()
			{
				EntityTypeId = _entityTypeEntities[0].Id,
				Name = "EntityType1",
				DeletedDate = DateTime.MinValue
			};
			EntityEntity mEntity = new EntityEntity()
			{
				EntityTypeId = _entityTypeEntities[1].Id,
				Name = "EntityType2",
				DeletedDate = DateTime.MinValue
			};

			entity = repository.Create(entity);
			mEntity = repository.Create(mEntity);

			_entityEntities.Add(entity);
			_entityEntities.Add(mEntity);
		}
		private static void ClearAll()
		{
			PersonRepository repository1 = new PersonRepository(ConfigSettings.MySqlDatabaseConnectionName);
			ContactRepository repository2 = new ContactRepository(ConfigSettings.MySqlDatabaseConnectionName);
			EntityRepository repository3 = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName);
			OccupationNameRepository repository4 = new OccupationNameRepository(ConfigSettings.MySqlDatabaseConnectionName);
			EntityTypeRepository repository5 = new EntityTypeRepository(ConfigSettings.MySqlDatabaseConnectionName);
			ContactTypeRepository repository6 = new ContactTypeRepository(ConfigSettings.MySqlDatabaseConnectionName);
			TitleRepository repository7 = new TitleRepository(ConfigSettings.MySqlDatabaseConnectionName);
			AddressTypeRepository repository8 = new AddressTypeRepository(ConfigSettings.MySqlDatabaseConnectionName);
			AddressRepository repository9 = new AddressRepository(ConfigSettings.MySqlDatabaseConnectionName);
			GenderTypeRepository repository10 = new GenderTypeRepository(ConfigSettings.MySqlDatabaseConnectionName);

			repository9.ClearCollection();
			repository1.ClearCollection();
			repository2.ClearCollection();
			repository3.ClearCollection();
			repository4.ClearCollection();
			repository5.ClearCollection();
			repository6.ClearCollection();
			repository7.ClearCollection();
			repository8.ClearCollection();
			repository10.ClearCollection();
		}
		public static void ClearEntity()
		{
			EntityRepository repository = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName);
			repository.ClearCollection();
		}
		public void Init()
		{
			_repository = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName);
		}