Ba.Core.Persistence.Mongo 1.1.3

Suggested Alternatives

Ba.Infrastructure.Persistence.Mongo

Additional Details

This package has been renamed for architectural consistency. Please use 'Ba.Infrastructure.Persistence.Mongo' instead.

dotnet add package Ba.Core.Persistence.Mongo --version 1.1.3
                    
NuGet\Install-Package Ba.Core.Persistence.Mongo -Version 1.1.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="Ba.Core.Persistence.Mongo" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ba.Core.Persistence.Mongo" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Ba.Core.Persistence.Mongo" />
                    
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 Ba.Core.Persistence.Mongo --version 1.1.3
                    
#r "nuget: Ba.Core.Persistence.Mongo, 1.1.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.
#:package Ba.Core.Persistence.Mongo@1.1.3
                    
#: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=Ba.Core.Persistence.Mongo&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=Ba.Core.Persistence.Mongo&version=1.1.3
                    
Install as a Cake Tool

Ba.Core.Persistence.Mongo

A modern and extensible Entity Framework Core–based Persistence Library designed for scalable, clean, and maintainable .NET applications.

Features

  • Generic MongoDB Repository Pattern
  • Soft Delete support (DeletedDate)
  • Date-based auditing (CreatedDate, UpdatedDate)
  • Pagination utilities (Paginate, ToPaginateAsync)
  • Dynamic Querying (Filter, Sort, Nested Filters)
  • Async CRUD operations
  • Clean Architecture & DDD compatible
  • Minimal configuration, plug-and-play usage

Installation

Install via .NET CLI: bash dotnet add package Ba.Core.Persistence.Mongo

Or via NuGet Package Manager: powershell Install-Package Ba.Core.Persistence.Mongo

Basic Usage

  • Program.cs

builder.Services.Configure<MongoSettings>( builder.Configuration.GetSection("MongoSettings"));

builder.Services.AddSingleton<MongoContext>(); builder.Services.AddScoped(typeof(IMongoRepositoryAsync<>), typeof(MongoRepositoryBase<>));

  • Appsettings.json

"MongoSettings": { "ConnectionString": "mongodb://localhost:27017", "Database": "MyAppDb" }

Example Document

public class User : BaseDocument { public string Name { get; set; } public string Email { get; set; } }

Example Usage

var user = await _userRepository.GetAsync(x ⇒ x.Email == "demo@example.com");

License

This project is licensed under the MIT License.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to open a Pull Request or create an Issue on GitHub.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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

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
1.1.3 1,169 12/1/2025 1.1.3 is deprecated.
1.1.1 1,275 11/25/2025 1.1.1 is deprecated.
1.1.0 1,269 11/24/2025 1.1.0 is deprecated.
1.0.0 1,281 11/24/2025 1.0.0 is deprecated.