Skip to content

Add implicit cast from .NET IPNetwork to NpgsqlInet#6232

Merged
roji merged 1 commit intonpgsql:mainfrom
roji:IPNetwork
Oct 5, 2025
Merged

Add implicit cast from .NET IPNetwork to NpgsqlInet#6232
roji merged 1 commit intonpgsql:mainfrom
roji:IPNetwork

Conversation

@roji
Copy link
Member

@roji roji commented Oct 5, 2025

Helps EFCore.PG especially, continues #5821.

@roji roji requested a review from vonzshik as a code owner October 5, 2025 19:46
public static implicit operator NpgsqlInet(IPAddress ip)
=> new(ip);

public static implicit operator NpgsqlInet(IPNetwork cidr)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mirrors the implicit cast we already had from the now-obsolete NpgsqlCidr (which was replaced by IPNetwork).

@roji roji enabled auto-merge (squash) October 5, 2025 19:47
@roji roji merged commit 0fc7f66 into npgsql:main Oct 5, 2025
16 checks passed
@roji roji deleted the IPNetwork branch October 5, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants