# Class NpgsqlNetworkDbFunctionsExtensions

Namespace
  Microsoft.EntityFrameworkCore

Assembly
  Npgsql.EntityFrameworkCore.PostgreSQL.dll

Provides extension methods supporting operator translation for PostgreSQL network types.

    public static class NpgsqlNetworkDbFunctionsExtensions

Inheritance
  object
  NpgsqlNetworkDbFunctionsExtensions

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Remarks

See: https://www.postgresql.org/docs/current/static/functions-net.html

## Methods

### Abbreviate(DbFunctions, NpgsqlCidr)

Returns the abbreviated display format as text.

    public static string Abbreviate(this DbFunctions _, NpgsqlCidr cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` NpgsqlCidr

  The cidr to abbreviate.

#### Returns

string

  The abbreviated display format as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Abbreviate(DbFunctions, NpgsqlInet)

Returns the abbreviated display format as text.

    public static string Abbreviate(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to abbreviate.

#### Returns

string

  The abbreviated display format as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Abbreviate(DbFunctions, (IPAddress Address, int Subnet))

Returns the abbreviated display format as text.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static string Abbreviate(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to abbreviate.

#### Returns

string

  The abbreviated display format as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Add(DbFunctions, NpgsqlInet, int)

Adds the `value` to the NpgsqlInet.

    public static NpgsqlInet Add(this DbFunctions _, NpgsqlInet inet, int value)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet.

`value` int

  The value to add.

#### Returns

NpgsqlInet

  The NpgsqlInet augmented by the `value`.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Add(DbFunctions, (IPAddress Address, int Subnet), int)

Adds the `value` to the (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) Add(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int value)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr.

`value` int

  The value to add.

#### Returns

(IPAddress Address, int Subnet)

  The (IPAddress Address, int Subnet) augmented by the `value`.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseAnd(DbFunctions, NpgsqlInet, NpgsqlInet)

Computes the bitwise AND of two NpgsqlInet instances.

    public static NpgsqlInet BitwiseAnd(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

NpgsqlInet

  The result of the bitwise AND operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseAnd(DbFunctions, PhysicalAddress, PhysicalAddress)

Computes the bitwise AND of two PhysicalAddress instances.

    public static PhysicalAddress BitwiseAnd(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

PhysicalAddress

  The result of the bitwise AND operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseAnd(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Computes the bitwise AND of two (IPAddress Address, int Subnet) instances.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) BitwiseAnd(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

(IPAddress Address, int Subnet)

  The result of the bitwise AND operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseNot(DbFunctions, NpgsqlInet)

Computes the bitwise NOT operation on an NpgsqlInet.

    public static NpgsqlInet BitwiseNot(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to negate.

#### Returns

NpgsqlInet

  The result of the bitwise NOT operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseNot(DbFunctions, PhysicalAddress)

Computes the bitwise NOT operation on an PhysicalAddress.

    public static PhysicalAddress BitwiseNot(this DbFunctions _, PhysicalAddress macaddr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The macaddr to negate.

#### Returns

PhysicalAddress

  The result of the bitwise NOT operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseNot(DbFunctions, (IPAddress Address, int Subnet))

Computes the bitwise NOT operation on an (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) BitwiseNot(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to negate.

#### Returns

(IPAddress Address, int Subnet)

  The result of the bitwise NOT operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseOr(DbFunctions, NpgsqlInet, NpgsqlInet)

Computes the bitwise OR of two NpgsqlInet instances.

    public static NpgsqlInet BitwiseOr(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

NpgsqlInet

  The result of the bitwise OR operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseOr(DbFunctions, PhysicalAddress, PhysicalAddress)

Computes the bitwise OR of two PhysicalAddress instances.

    public static PhysicalAddress BitwiseOr(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

PhysicalAddress

  The result of the bitwise OR operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### BitwiseOr(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Computes the bitwise OR of two (IPAddress Address, int Subnet) instances.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) BitwiseOr(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

(IPAddress Address, int Subnet)

  The result of the bitwise OR operation.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Broadcast(DbFunctions, NpgsqlInet)

Returns the broadcast address for a network.

    public static NpgsqlInet Broadcast(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to derive the broadcast address.

#### Returns

NpgsqlInet

  The broadcast address for a network.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Broadcast(DbFunctions, (IPAddress Address, int Subnet))

Returns the broadcast address for a network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static IPAddress Broadcast(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to derive the broadcast address.

#### Returns

IPAddress

  The broadcast address for a network.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedBy(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is contained within another NpgsqlInet.

    public static bool ContainedBy(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to locate.

`other` NpgsqlInet

  The inet to search.

#### Returns

bool

  True if the NpgsqlInet is contained within the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedBy(DbFunctions, IPAddress, (IPAddress Address, int Subnet))

Determines whether an IPAddress is contained within a network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainedBy(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` IPAddress

  The inet to locate.

`other` (IPAddress Address, int Subnet)

  The cidr to search.

#### Returns

bool

  True if the IPAddress is contained within the network; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedBy(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is contained within another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to locate.

`other` (IPAddress Address, int Subnet)

  The cidr to search.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is contained within the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedByOrEqual(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is contained within or equal to another NpgsqlInet.

    public static bool ContainedByOrEqual(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to locate.

`other` NpgsqlInet

  The inet to search.

#### Returns

bool

  True if the NpgsqlInet is contained within or equal to the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedByOrEqual(DbFunctions, IPAddress, (IPAddress Address, int Subnet))

Determines whether an IPAddress is contained within or equal to a network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainedByOrEqual(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` IPAddress

  The inet to locate.

`other` (IPAddress Address, int Subnet)

  The cidr to search.

#### Returns

bool

  True if the IPAddress is contained within or equal to the network; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainedByOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is contained within or equal to another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainedByOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to locate.

`other` (IPAddress Address, int Subnet)

  The cidr to search.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is contained within or equal to the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Contains(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet contains another NpgsqlInet.

    public static bool Contains(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The IP address to search.

`other` NpgsqlInet

  The IP address to locate.

#### Returns

bool

  True if the NpgsqlInet contains the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Contains(DbFunctions, (IPAddress Address, int Subnet), IPAddress)

Determines whether a network contains another IPAddress.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool Contains(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The network to search.

`other` IPAddress

  The IP address to locate.

#### Returns

bool

  True if the network contains the other IPAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Contains(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) contains another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool Contains(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to search.

`other` (IPAddress Address, int Subnet)

  The cidr to locate.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) contains the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrContainedBy(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet contains or is contained by another NpgsqlInet.

    public static bool ContainsOrContainedBy(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The IP address to search.

`other` NpgsqlInet

  The IP address to locate.

#### Returns

bool

  True if the NpgsqlInet contains or is contained by the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrContainedBy(DbFunctions, IPAddress, (IPAddress Address, int Subnet))

Determines whether an IPAddress contains or is contained by a network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainsOrContainedBy(this DbFunctions _, IPAddress inet, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` IPAddress

  The IP address to search.

`other` (IPAddress Address, int Subnet)

  The network to locate.

#### Returns

bool

  True if the IPAddress contains or is contained by the network; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrContainedBy(DbFunctions, (IPAddress Address, int Subnet), IPAddress)

Determines whether a network contains or is contained by an IPAddress.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainsOrContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The network to search.

`other` IPAddress

  The IP address to locate.

#### Returns

bool

  True if the network contains or is contained by the IPAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrContainedBy(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) contains or is contained by another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainsOrContainedBy(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to search.

`other` (IPAddress Address, int Subnet)

  The cidr to locate.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) contains or is contained by the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrEqual(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet contains or is equal to another NpgsqlInet.

    public static bool ContainsOrEqual(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The IP address to search.

`other` NpgsqlInet

  The IP address to locate.

#### Returns

bool

  True if the NpgsqlInet contains or is equal to the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrEqual(DbFunctions, (IPAddress Address, int Subnet), IPAddress)

Determines whether a network contains or is equal to another IPAddress.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainsOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, IPAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The network to search.

`other` IPAddress

  The IP address to locate.

#### Returns

bool

  True if the network contains or is equal to the other IPAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### ContainsOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) contains or is equal to another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool ContainsOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to search.

`other` (IPAddress Address, int Subnet)

  The cidr to locate.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) contains or is equal to the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Family(DbFunctions, NpgsqlInet)

Extracts the family of an address; 4 for IPv4, 6 for IPv6.

    public static int Family(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to derive the family.

#### Returns

int

  The family of an address; 4 for IPv4, 6 for IPv6.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Family(DbFunctions, (IPAddress Address, int Subnet))

Extracts the family of an address; 4 for IPv4, 6 for IPv6.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static int Family(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to derive the family.

#### Returns

int

  The family of an address; 4 for IPv4, 6 for IPv6.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThan(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is greater than another NpgsqlInet.

    public static bool GreaterThan(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

bool

  True if the NpgsqlInet is greater than the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThan(DbFunctions, PhysicalAddress, PhysicalAddress)

Determines whether an PhysicalAddress is greater than another PhysicalAddress.

    public static bool GreaterThan(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

bool

  True if the PhysicalAddress is greater than the other PhysicalAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThan(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is greater than another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool GreaterThan(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is greater than the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThanOrEqual(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is greater than or equal to another NpgsqlInet.

    public static bool GreaterThanOrEqual(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

bool

  True if the NpgsqlInet is greater than or equal to the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThanOrEqual(DbFunctions, PhysicalAddress, PhysicalAddress)

Determines whether an PhysicalAddress is greater than or equal to another PhysicalAddress.

    public static bool GreaterThanOrEqual(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

bool

  True if the PhysicalAddress is greater than or equal to the other PhysicalAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### GreaterThanOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is greater than or equal to another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool GreaterThanOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is greater than or equal to the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Host(DbFunctions, NpgsqlInet)

Extracts the host (i.e. the IP address) as text.

    public static string Host(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet from which to extract the host.

#### Returns

string

  The host (i.e. the IP address) as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Host(DbFunctions, (IPAddress Address, int Subnet))

Extracts the host (i.e. the IP address) as text.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static string Host(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr from which to extract the host.

#### Returns

string

  The host (i.e. the IP address) as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### HostMask(DbFunctions, NpgsqlInet)

Constructs the host mask for the network.

    public static NpgsqlInet HostMask(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to construct the host mask.

#### Returns

NpgsqlInet

  The constructed host mask.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### HostMask(DbFunctions, (IPAddress Address, int Subnet))

Constructs the host mask for the network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static IPAddress HostMask(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to construct the host mask.

#### Returns

IPAddress

  The constructed host mask.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThan(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is less than another NpgsqlInet.

    public static bool LessThan(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

bool

  True if the NpgsqlInet is less than the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThan(DbFunctions, PhysicalAddress, PhysicalAddress)

Determines whether an PhysicalAddress is less than another PhysicalAddress.

    public static bool LessThan(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

bool

  True if the PhysicalAddress is less than the other PhysicalAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThan(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is less than another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool LessThan(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is less than the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThanOrEqual(DbFunctions, NpgsqlInet, NpgsqlInet)

Determines whether an NpgsqlInet is less than or equal to another NpgsqlInet.

    public static bool LessThanOrEqual(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The left-hand inet.

`other` NpgsqlInet

  The right-hand inet.

#### Returns

bool

  True if the NpgsqlInet is less than or equal to the other NpgsqlInet; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThanOrEqual(DbFunctions, PhysicalAddress, PhysicalAddress)

Determines whether an PhysicalAddress is less than or equal to another PhysicalAddress.

    public static bool LessThanOrEqual(this DbFunctions _, PhysicalAddress macaddr, PhysicalAddress other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macaddr` PhysicalAddress

  The left-hand macaddr.

`other` PhysicalAddress

  The right-hand macaddr.

#### Returns

bool

  True if the PhysicalAddress is less than or equal to the other PhysicalAddress; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### LessThanOrEqual(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Determines whether an (IPAddress Address, int Subnet) is less than or equal to another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool LessThanOrEqual(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The left-hand cidr.

`other` (IPAddress Address, int Subnet)

  The right-hand cidr.

#### Returns

bool

  True if the (IPAddress Address, int Subnet) is less than or equal to the other (IPAddress Address, int Subnet); otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### MaskLength(DbFunctions, NpgsqlInet)

Extracts the length of the subnet mask.

    public static int MaskLength(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to extract the subnet length.

#### Returns

int

  The length of the subnet mask.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### MaskLength(DbFunctions, (IPAddress Address, int Subnet))

Extracts the length of the subnet mask.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static int MaskLength(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to extract the subnet length.

#### Returns

int

  The length of the subnet mask.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Merge(DbFunctions, NpgsqlInet, NpgsqlInet)

Constructs the smallest network which includes both of the given networks.

    public static NpgsqlCidr Merge(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The first inet.

`other` NpgsqlInet

  The second inet.

#### Returns

NpgsqlCidr

  The smallest network which includes both of the given networks.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Merge(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Constructs the smallest network which includes both of the given networks.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) Merge(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The first cidr.

`other` (IPAddress Address, int Subnet)

  The second cidr.

#### Returns

(IPAddress Address, int Subnet)

  The smallest network which includes both of the given networks.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Netmask(DbFunctions, NpgsqlInet)

Constructs the subnet mask for the network.

    public static NpgsqlInet Netmask(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to construct the subnet mask.

#### Returns

NpgsqlInet

  The subnet mask for the network.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Netmask(DbFunctions, (IPAddress Address, int Subnet))

Constructs the subnet mask for the network.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static IPAddress Netmask(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to construct the subnet mask.

#### Returns

IPAddress

  The subnet mask for the network.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Network(DbFunctions, NpgsqlInet)

Extracts the network part of the address.

    public static NpgsqlCidr Network(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet used to extract the network.

#### Returns

NpgsqlCidr

  The network part of the address.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Network(DbFunctions, (IPAddress Address, int Subnet))

Extracts the network part of the address.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) Network(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr used to extract the network.

#### Returns

(IPAddress Address, int Subnet)

  The network part of the address.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### SameFamily(DbFunctions, NpgsqlInet, NpgsqlInet)

Tests if the addresses are in the same family.

    public static bool SameFamily(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The primary inet.

`other` NpgsqlInet

  The other inet.

#### Returns

bool

  True if the addresses are in the same family; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### SameFamily(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Tests if the addresses are in the same family.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static bool SameFamily(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The primary cidr.

`other` (IPAddress Address, int Subnet)

  The other cidr.

#### Returns

bool

  True if the addresses are in the same family; otherwise, false.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Set7BitMac8(DbFunctions, PhysicalAddress)

Sets the 7th bit to one, also known as modified EUI-64, for inclusion in an IPv6 address.

    public static PhysicalAddress Set7BitMac8(this DbFunctions _, PhysicalAddress macAddress)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macAddress` PhysicalAddress

  The MAC address to modify.

#### Returns

PhysicalAddress

  The MAC address with the 7th bit set to one.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### SetMaskLength(DbFunctions, NpgsqlCidr, int)

Sets the length of the subnet mask.

    public static NpgsqlCidr SetMaskLength(this DbFunctions _, NpgsqlCidr cidr, int length)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` NpgsqlCidr

  The cidr to modify.

`length` int

  The subnet mask length to set.

#### Returns

NpgsqlCidr

  The network with a subnet mask of the specified length.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### SetMaskLength(DbFunctions, NpgsqlInet, int)

Sets the length of the subnet mask.

    public static NpgsqlInet SetMaskLength(this DbFunctions _, NpgsqlInet inet, int length)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to modify.

`length` int

  The subnet mask length to set.

#### Returns

NpgsqlInet

  The network with a subnet mask of the specified length.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### SetMaskLength(DbFunctions, (IPAddress Address, int Subnet), int)

Sets the length of the subnet mask.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) SetMaskLength(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int length)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to modify.

`length` int

  The subnet mask length to set.

#### Returns

(IPAddress Address, int Subnet)

  The network with a subnet mask of the specified length.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Subtract(DbFunctions, NpgsqlInet, NpgsqlInet)

Subtracts one NpgsqlInet from another NpgsqlInet.

    public static int Subtract(this DbFunctions _, NpgsqlInet inet, NpgsqlInet other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet from which to subtract.

`other` NpgsqlInet

  The inet to subtract.

#### Returns

int

  The numeric difference between the two given addresses.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Subtract(DbFunctions, NpgsqlInet, long)

Subtracts the `value` from the NpgsqlInet.

    public static NpgsqlInet Subtract(this DbFunctions _, NpgsqlInet inet, long value)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet.

`value` long

  The value to subtract.

#### Returns

NpgsqlInet

  The NpgsqlInet augmented by the `value`.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Subtract(DbFunctions, (IPAddress Address, int Subnet), int)

Subtracts the `value` from the (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static (IPAddress Address, int Subnet) Subtract(this DbFunctions _, (IPAddress Address, int Subnet) cidr, int value)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The inet.

`value` int

  The value to subtract.

#### Returns

(IPAddress Address, int Subnet)

  The (IPAddress Address, int Subnet) augmented by the `value`.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Subtract(DbFunctions, (IPAddress Address, int Subnet), (IPAddress Address, int Subnet))

Subtracts one (IPAddress Address, int Subnet) from another (IPAddress Address, int Subnet).

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static int Subtract(this DbFunctions _, (IPAddress Address, int Subnet) cidr, (IPAddress Address, int Subnet) other)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr from which to subtract.

`other` (IPAddress Address, int Subnet)

  The cidr to subtract.

#### Returns

int

  The difference between the two addresses.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Text(DbFunctions, NpgsqlInet)

Extracts the IP address and subnet mask as text.

    public static string Text(this DbFunctions _, NpgsqlInet inet)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`inet` NpgsqlInet

  The inet to extract as text.

#### Returns

string

  The IP address and subnet mask as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Text(DbFunctions, (IPAddress Address, int Subnet))

Extracts the IP address and subnet mask as text.

    [Obsolete("Use the overload which accepts NpgsqlCidr", true)]
    public static string Text(this DbFunctions _, (IPAddress Address, int Subnet) cidr)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`cidr` (IPAddress Address, int Subnet)

  The cidr to extract as text.

#### Returns

string

  The IP address and subnet mask as text.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.

### Truncate(DbFunctions, PhysicalAddress)

Sets the last 3 bytes of the MAC address to zero. For macaddr8, the last 5 bytes are set to zero.

    public static PhysicalAddress Truncate(this DbFunctions _, PhysicalAddress macAddress)

#### Parameters

`_` DbFunctions

  The DbFunctions instance.

`macAddress` PhysicalAddress

  The MAC address to truncate.

#### Returns

PhysicalAddress

  The MAC address with the last 3 bytes set to zero. For macaddr8, the last 5 bytes are set to zero.

#### Exceptions

NotSupportedException

  This method is only intended for use via SQL translation as part of an EF Core LINQ query.