Webrox.EntityFrameworkCore.Postgres 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Webrox.EntityFrameworkCore.Postgres --version 1.0.0                
NuGet\Install-Package Webrox.EntityFrameworkCore.Postgres -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Webrox.EntityFrameworkCore.Postgres" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Webrox.EntityFrameworkCore.Postgres --version 1.0.0                
#r "nuget: Webrox.EntityFrameworkCore.Postgres, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Webrox.EntityFrameworkCore.Postgres as a Cake Addin
#addin nuget:?package=Webrox.EntityFrameworkCore.Postgres&version=1.0.0

// Install Webrox.EntityFrameworkCore.Postgres as a Cake Tool
#tool nuget:?package=Webrox.EntityFrameworkCore.Postgres&version=1.0.0                

Webrox.EntityFrameworkCore

Use the repo on GitHub to create issues and feature requests.

Features

Implement ROW_NUMBER Linq Function (EF.Functions.RowNumber) with Entity Framework Core for :

  • SQL Server
  • MySQL
  • SQLite
  • PostgreSQL

Entity Framework Version Support :

  • min 5.0 (.net standard 2.1)

Setup

SQLServer

using Webrox.EntityFrameworkCore.SqlServer;

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    // SQL Server
    optionsBuilder.UseSqlServer("connectionstring", opts =>
    {
        opts.AddRowNumberSupport();
    });
}

MySQL

using Webrox.EntityFrameworkCore.MySql;

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder.UseMySQL("connectionstring", opts =>
    {
        opts.AddRowNumberSupport();
    });
}

SQLite

using Webrox.EntityFrameworkCore.Sqlite;

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder.UseSqlite("connectionstring", opts =>
    {
        opts.AddRowNumberSupport();
    });
}

PostgreSQL

using Webrox.EntityFrameworkCore.Postgres;

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder.UseNpgsql("connectionstring", opts =>
    {
        opts.AddRowNumberSupport();
    });
}

RowNumber Syntax

using Webrox.EntityFrameworkCore.Core;

// simple RowNumber + OrderBy
context.Table1.Select(t => new
{
    Id = t.Id,
    RowNumber = EF.Functions.RowNumber(EF.Functions.OrderBy(t.Id))
}

// complex RowNumber + PartitionBy + OrderBy
context.Table1.Select(t => new
{
    Id = t.Id,
    RowNumber = EF.Functions.RowNumber(
            EF.Functions.PartitionBy(t.GroupId)
                        .ThenPartitionBy(t.SubGroupId),
            EF.Functions.OrderByDescending(t.Id)
                        .ThenBy(t.SubId)
            )
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.4.0 293 2/4/2024
2.3.0 275 2/4/2024
2.2.0 266 1/27/2024
2.1.0 235 1/24/2024
2.0.0 318 1/8/2024
1.0.0 293 12/30/2023