public static EntityEntity CreateEntity() { EntityRepository repository = new EntityRepository(ConfigSettings.MySqlDatabaseConnectionName); EntityEntity entity = EntityData.GetItemForInsert(); //repository.ClearCollection(); entity = repository.Create(entity); return entity; }
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); }