private void RemoveCollision(Position position1, Position position2) { var collisionExists = _conflictRepository.Search(e => e.PositionId1 == position1.Id && e.PositionId2 == position2.Id, 0, 1).FirstOrDefault(); if (collisionExists != null) { _conflictRepository.Delete(collisionExists.Id); } }
private void RemoveCollisions(Position position) { var collisions = _conflictRepository.Search(e => e.PositionId1 == position.Id, 0, 100); foreach (var collision in collisions) { _conflictRepository.Delete(collision.Id); } }