Muslim.GenericRepository.Interface 8.0.0

dotnet add package Muslim.GenericRepository.Interface --version 8.0.0
                    
NuGet\Install-Package Muslim.GenericRepository.Interface -Version 8.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="Muslim.GenericRepository.Interface" Version="8.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Muslim.GenericRepository.Interface" Version="8.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Muslim.GenericRepository.Interface" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Muslim.GenericRepository.Interface --version 8.0.0
                    
#r "nuget: Muslim.GenericRepository.Interface, 8.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.
#:package Muslim.GenericRepository.Interface@8.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Muslim.GenericRepository.Interface&version=8.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Muslim.GenericRepository.Interface&version=8.0.0
                    
Install as a Cake Tool

Muslim.GenericRepository.Interface

The abstraction only: IRepository<TEntity> and the fourteen interfaces it composes — reads, writes, soft delete, bulk operations, counts, raw SQL and save.

Reference this when you want to depend on the contract without the EF Core implementation — a Domain or Application project that declares IUserRepository : IRepository<User> and lets the Data project supply the concrete type.

dotnet add package Muslim.GenericRepository.Interface

If you want a working repository, install Muslim.GenericRepository instead — it brings this package with it.

Namespaces

IRepository<T> and the interfaces it inherits live apart, so consumers import both:

using Muslim.GenericRepository.Interface;  // IRepository<T>
using Muslim.IGenericRepository;           // ICreate<T>, IFind<T>, IDelete<T>, …

Shape

IRepository<TEntity> composes, for TEntity : Entity:

Interface Covers
IGetById<T> primary-key lookup, entity or projected
IGetAll<T> whole-table reads
IFind<T> predicate and IFilter<T> reads (grid paging, sorting, search)
IFirstOrDefault<T> first match, or null
ISingleOrDefault<T> the one match — throws if more than one
ICreate<T> inserts, entity- or DTO-driven, staged or committed
IUpdate<T> updates, with audit columns preserved from the database
IDelete<T> hard deletes, including bulk DeleteWhereAsync
ISoftDelete<T> soft deletes and restore, including bulk
IEntityState<T> change-tracker access: detach, force state
ICount<T> / IAny<T> counts and existence checks
ISqlOperations<T> raw and interpolated SQL
ISave<T> commit staged changes

Plus Query and QueryAsNoTracking for anything the named methods do not cover.

Conventions the contract assumes

  • Create* stages, SaveCreate* commits. The same split applies to update, delete and soft delete. Stage when several repositories must succeed or fail together.
  • Audit columns are written by the implementation — CreatedBy/CreatedDate on insert, UpdateBy/UpdateDate on update, IsDeleted/DeletedBy/DeletedDate on soft delete. All timestamps are UTC.
  • isTracking (default true) on entity-returning reads. Projection overloads omit it: EF never tracks a projection to a non-entity type.
  • Bulk *WhereAsync / *ByIdsAsync methods run one statement and need no Save(). They do not load entities, so the change tracker and SaveChanges overrides never see those rows.

Every member ships with XML documentation, so hovering a call in your IDE shows the summary, an example and what it returns.

License

See LICENSE.txt. Free for personal and commercial use under the stated conditions.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Muslim.GenericRepository.Interface:

Package Downloads
Muslim.GenericRepository

EF Core repository for entities with audit columns: reads, writes, soft delete, bulk operations and raw SQL, with CreatedBy/UpdateBy/DeletedBy and UTC timestamps written automatically. Implements Muslim.GenericRepository.Interface.

Muslim.GenericService

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.0 139 9/23/2026
2.3.3 166 8/10/2026
2.2.5 243 1/19/2025

Bumps the Muslim.Inject dependency to 2.3.0 (adds parameterless Inject<T>()/InjectRequired<T>()/TryInject<T>(out T) overloads and Reset() for test teardown — source-compatible, see its own CHANGELOG). No changes to this package's own members.