leftjoin-rightjoin-fulljoin-outerjoin 3.2.0

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

// Install leftjoin-rightjoin-fulljoin-outerjoin as a Cake Tool
#tool nuget:?package=leftjoin-rightjoin-fulljoin-outerjoin&version=3.2.0                

leftjoin-rightjoin-fulljoin-outerjoin

Very simple Left/Right/FullOuterJoin extension methods for both IQueryable and IEnumerable types

In linq, if you need a left outer join, you have to use GroupJoin/Selectmany/DefaultIfEmpty blocks. There is another package in nuget containing similar extensions for only IEnumerable, which results in performance loss for database queries. For this need, I developed IQueryable versions.

Installation

nuget

Functionalities:

  • Left Join for IQueryables: Translated into database queries
  • Left Join for IEnumerables: In memory joining
  • Left Excluding Join for IQueryable/IEnumerables: Taking only Left side for matching items
  • Right Join for IQueryable
  • Right Join for IEnumerable
  • Right Excluding Join for IQueryable/IEnumerables
  • Full Outer Join for IQueryable
  • Full Outer Join for IEnumerable
  • Left Join for IEnumerable via ON statement condition: other overloads uses lambdas for LEFT=> key and RIGTH ⇒ key syntax, this overload uses (LEFT, RIGHT) ⇒ boolean syntax

Usage

For IQueryable:

JOIN TYPE METHOD NAME Example RETURN TYPE
LEFT JOIN LeftJoinExt() repository.GetAll().LeftJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
LEFT EXCL JOIN LeftExcludingJoin() repository.GetAll().LeftExcludingJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
RIGHT JOIN RightJoinExt() repository.GetAll().LeftExcludingJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
RIGHT EXCL JOIN RightExcludingJoinExt() repository.GetAll().LeftExcludingJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
INNER JOIN InnerJoinExt() repository.GetAll().InnerJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
FULL JOIN FullOuterJoinExt() repository.GetAll().FullOuterJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>
FULL EXCL JOIN FullOuterExcludingJoinExt() repository.GetAll().FullOuterExcludingJoinExt(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IQueryable<JoinItem<TLeft, TRight>>

For IEnumerable:

JOIN TYPE METHOD NAME Example RETURN TYPE
LEFT JOIN LeftJoinExtEnumerable() repository.GetAll().LeftJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IEnumerable<JoinItem<TLeft, TRight>>
LeftJoinExtEnumerable() repository.GetAll().LeftJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
LEFT EXCL JOIN LeftExcludingJoinExtEnumerable() repository.GetAll().LeftExcludingJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
RIGHT JOIN RightJoinExtEnumerable() repository.GetAll().RightJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
RIGHT EXCL JOIN RightExcludingJoinExtEnumerable() repository.GetAll().RightExcludingJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
INNER JOIN InnerJoinExtEnumerable() repository.GetAll().InnerJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id) IEnumerable<JoinItem<TLeft, TRight>>
repository.GetAll().InnerJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
FULL JOIN FullOuterJoinExtEnumerable() repository.GetAll().FullOuterJoinExtEnumerable(roles, ur ⇒ ur.RoleId, role ⇒ role.Id, (left, right)=> new {...}) IEnumerable< TResult >
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 was computed. 
.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.

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
3.2.0 12,242 3/4/2021
3.1.0 2,973 2/3/2021
3.0.1 2,096 5/11/2020
3.0.0 1,008 5/11/2020
2.2.0 1,710 3/12/2020
2.1.0 1,649 10/23/2019
2.0.2 1,072 10/21/2019
1.2.0 1,305 8/2/2019

v3.2 fullouterjoin not working, fixed
           v3.1 removed obsolete warnings, since they are well understood.
           v3.0 All extensions got Ext prefix, to seperate from EntityFramework LeftJoin like methods.
           v2.2 JointItem tostring method written
           v2.1 LeftJoin.IEnumerable: Join with condition method added
v2.0 Linqkit and TResult projection for IQueryable removed. IQueryable methods now returning Tuples instead of TResult types given by the parameter Func