Mindfire.EFRepository 2.0.0-alpha

This is a prerelease version of Mindfire.EFRepository.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Mindfire.EFRepository --version 2.0.0-alpha
NuGet\Install-Package Mindfire.EFRepository -Version 2.0.0-alpha
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="Mindfire.EFRepository" Version="2.0.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mindfire.EFRepository --version 2.0.0-alpha
#r "nuget: Mindfire.EFRepository, 2.0.0-alpha"
#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 Mindfire.EFRepository as a Cake Addin
#addin nuget:?package=Mindfire.EFRepository&version=2.0.0-alpha&prerelease

// Install Mindfire.EFRepository as a Cake Tool
#tool nuget:?package=Mindfire.EFRepository&version=2.0.0-alpha&prerelease

EFRepository

Use a LINQ-Enabled version of the Repository Pattern for Entity Framework

Interface

/// <summary>
/// Interface for interacting with data storage through the repository pattern
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public interface IRepository<TEntity> : IDisposable where TEntity : class, new()
{
	/// <summary>Queriable Entity</summary>
	IQueryable<TEntity> Entity { get; }

	/// <summary>
	/// Find an entity based on key(s)
	/// </summary>
	/// <param name="keys">The key(s) for the table</param>
	/// <returns>Entity if found, otherwise null</returns>
	TEntity FindOne(params object[] keys);

	/// <summary>
	/// Add or update entities
	/// </summary>
	/// <param name="values">Entities to add</param>
	void AddOrUpdate(params TEntity[] values);

	/// <summary>
	/// Add or update entities
	/// </summary>
	/// <param name="collection">Entities to add</param>
	void AddOrUpdate(IEnumerable<TEntity> collection);

	/// <summary>
	/// Delete a single entity by key(s)
	/// </summary>
	/// <param name="keys">The key(s) for the table</param>
	void DeleteOne(params object[] keys);

	/// <summary>
	/// Delete one or more entities
	/// </summary>
	/// <param name="values">Entities to delete</param>
	void Delete(params TEntity[] values);

	/// <summary>
	/// Delete one or more entities
	/// </summary>
	/// <param name="collection">Entities to delete</param>
	void Delete(IEnumerable<TEntity> collection);

	/// <summary>
	/// Save pending changes for the collection
	/// </summary>
	/// <returns>Number of affected entities</returns>
	int Save();

	/// <summary>
	/// Save pending changes for the collection async
	/// </summary>
	/// <returns>Number of affected entities</returns>
	Task<int> SaveAsync();

	/// <summary>
	/// Save pending changes for the collection async with cancellation
	/// </summary>
	/// <param name="cancellationToken">Cancelation Token</param>
	/// <returns>Number of affected entities</returns>
	Task<int> SaveAsync(CancellationToken cancellationToken);

	/// <summary>Event that fires when an item is added</summary>
	event Action<TEntity> ItemAdded;

	/// <summary>Event that fires when an itemis modified</summary>
	event Action<TEntity> ItemModified;

	/// <summary>Event that fires when an item is deleted</summary>
	event Action<TEntity> ItemDeleted;
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 netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.4 is compatible.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net452 is compatible.  net46 was computed.  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 tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 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.3.5 1,917 5/20/2022
2.2.0 822 1/13/2022
2.1.1 839 1/12/2022
2.0.0 653 1/11/2022
2.0.0-alpha 895 10/7/2020
1.1.3 1,067 11/27/2019
1.1.1 1,088 11/13/2019
1.0.2 1,719 7/21/2017
1.0.1 1,361 6/19/2017
1.0.0-alpha 1,388 5/23/2017