SmartWhere 2.2.2

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

// Install SmartWhere as a Cake Tool
#tool nuget:?package=SmartWhere&version=2.2.2                

SmartWhere

It intelligently filters a sequence of items in a simple and practical way.

GitHub Workflow Status (with event) SmartWhere Nuget SmartWhere Nuget

SmartWhere is a method that aims to make the Queryable.Where method smarter and is based on the foundations of .NET.

I would be very happy if you could star ⭐ the project.

Quick Start

The usage of SmartWhere is quite simple.

  1. Install SmartWhere NuGet package from here.
PM> Install-Package SmartWhere
  1. You need to define our Request object for SmartWhere and sign it with the IWhereClause interface.
 public class PublisherSearchRequest : IWhereClause
  1. We mark the properties to be included in the filter with the WhereClause Attribute.
public class PublisherSearchRequest : IWhereClause
{
    [WhereClause]
    public int Id { get; set; }

    [WhereClause(PropertyName = "Name"]
    public string PublisherName { get; set; }

    [WhereClause("Book.Name")]
    public string BookName { get; set; }

    [WhereClause("Books.Author.Name")]
    public string AuthorName { get; set; }
}
  1. And we filter smartly. That's it.
 [HttpPost]
 public IActionResult GetPublishers(PublisherSearchRequest request)
 {
     var result = _context.Set<Publisher>()
         .Include(x => x.Books)
         .ThenInclude(x => x.Author)
         .Where(request)
         .ToList();

     return Ok(result);
 }

Be sure to check out the Wiki page for more details. ⭐

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.
  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SmartWhere:

Package Downloads
EntityGuardian

In your projects developed with EntityFramework, it keeps track of all the changes that take place in your database and records them wherever you want.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.2 488 7/10/2024
2.2.1 282 5/16/2024
2.2.0.3 131 4/14/2024
2.2.0.2 633 2/27/2024
2.2.0.1 298 1/22/2024
2.2.0 347 12/2/2023
2.1.1.2 590 10/23/2023
2.1.1.1 141 10/23/2023
2.1.1 179 10/5/2023
2.1.0 136 9/25/2023
2.0.3 149 9/21/2023
2.0.2 138 9/21/2023
2.0.1 137 9/20/2023
2.0.0 157 9/20/2023
1.0.3 130 9/15/2023
1.0.2.1 197 9/11/2023
1.0.2 184 9/11/2023
1.0.1 199 9/11/2023 1.0.1 is deprecated because it is no longer maintained and has critical bugs.
1.0.0 182 9/8/2023 1.0.0 is deprecated because it is no longer maintained and has critical bugs.