kr.bbon.EntityFrameworkCore.Extensions 1.5.3

dotnet add package kr.bbon.EntityFrameworkCore.Extensions --version 1.5.3
NuGet\Install-Package kr.bbon.EntityFrameworkCore.Extensions -Version 1.5.3
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="kr.bbon.EntityFrameworkCore.Extensions" Version="1.5.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add kr.bbon.EntityFrameworkCore.Extensions --version 1.5.3
#r "nuget: kr.bbon.EntityFrameworkCore.Extensions, 1.5.3"
#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 kr.bbon.EntityFrameworkCore.Extensions as a Cake Addin
#addin nuget:?package=kr.bbon.EntityFrameworkCore.Extensions&version=1.5.3

// Install kr.bbon.EntityFrameworkCore.Extensions as a Cake Tool
#tool nuget:?package=kr.bbon.EntityFrameworkCore.Extensions&version=1.5.3

kr.bbon.EntityFrameworkCore.Extensions Package

alternate text is missing from this package README image alternate text is missing from this package README image publish to nuget

Features

Sort method

Extends IQueryable<T> interface.

Sort elements with filed name that Use OderBy, OrderByDescending, ThenBy, ThenByDescending methods.

Signature:

Sort(string fileName, bool isAscending)

Example code:

See Example project. example/Example.App

using(var ctx = new ExampleDbContext()){
    var result =ctx.Documents.Sort(nameof(Document.Content)).Sort(nameof(Document.Id), false);
}

ToPagedModel method

public class DocumentModel
{

}

public class DocumentPagedModel : PagedModel<DocumentModel>
{

}

//
var page = 1;
var limit = 10;

using(var ctx = new ExampleDbContext()){
    var result =ctx.Documents
        .Select(x => new DocumentModel
        {
            //
        })
        .ToPagedModel<DocumentModel,DocumentPagedModel>(page, limit);

    var items = result.Items; // You got paged items.
}

License

Follow the .net license and the Microsoft.EntityFrameworkCore license.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on kr.bbon.EntityFrameworkCore.Extensions:

Package Downloads
kr.bbon.Data

kr.bbon.Data

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.3 354 12/31/2022
1.5.2 261 12/31/2022
1.5.1 262 12/31/2022
1.5.0 409 11/19/2022
1.4.7 389 10/1/2022
1.4.6 366 10/1/2022
1.4.5 836 4/18/2022
1.4.4 514 3/19/2022
1.4.0 406 3/19/2022
1.3.3 443 1/22/2022
1.3.2 421 1/21/2022
1.3.1 425 1/21/2022
1.3.0 468 12/7/2021
1.2.0 410 11/12/2021
1.1.0 431 6/20/2021
1.0.2 329 5/28/2021
1.0.1 343 5/18/2021
1.0.0 332 1/30/2021