Twileloop.UOW.LiteDB 2.3.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Twileloop.UOW.LiteDB --version 2.3.0
NuGet\Install-Package Twileloop.UOW.LiteDB -Version 2.3.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="Twileloop.UOW.LiteDB" Version="2.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Twileloop.UOW.LiteDB --version 2.3.0
#r "nuget: Twileloop.UOW.LiteDB, 2.3.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 Twileloop.UOW.LiteDB as a Cake Addin
#addin nuget:?package=Twileloop.UOW.LiteDB&version=2.3.0

// Install Twileloop.UOW.LiteDB as a Cake Tool
#tool nuget:?package=Twileloop.UOW.LiteDB&version=2.3.0

<br /> <div align="center"> <a href="https://github.com/sangeethnandakumar/Twileloop.UOW"> <img src="https://iili.io/HPIj6ss.png" alt="Logo" width="80" height="80"> </a>

<h2 align="center"> Twileloop UOW</h2> <h4 align="center"> Free | Open-Source | Fast </h4> </div>

About

A lightweight and ready-made implementation of unit of work pattern + and a NoSQL database like LiteDB or MongoDB. With ability to use multiple LiteDB or MongoDB databases, ready-made CRUD operations repository and thread-safe features.

License

Twileloop.UOW.LiteDB - is licensed under the MIT License. See the LICENSE file for more details.

Twileloop.UOW.MongoDB - is licensed under the MIT License. See the LICENSE file for more details.

This library is absolutely free. If it gives you a smile, A small coffee would be a great way to support my work. Thank you for considering it!

"Buy Me A Coffee"

Integration Guide

Read full integration guide: https://packages.twileloop.com/Twileloop.UOW

1. Register all databases to ASP.NET dependency injection

//LiteDB
builder.Services.AddUnitOfWork((uow) => {
    uow.Connections = new List<LiteDBConnection>
    {
        new LiteDBConnection("DatabaseA", "Filename=DatabaseA.db; Mode=Shared; Password=****;"),
        new LiteDBConnection("DatabaseB", "Filename=DatabaseB.db; Mode=Shared; Password=****;")
    };
});

//MongoDB
builder.Services.AddUnitOfWork((uow) => {
    uow.Connections = new List<MongoDBConnection>
    {
        new MongoDBConnection("DatabaseA", "mongodb+srv://Uername:****@Cluster"),
        new MongoDBConnection("DatabaseB", "mongodb+srv://Uername:****@Cluster")
    };
});

2. For No Dependency Injection Setup

//LiteDB
var context = LiteDB.Support.Extensions.BuildDbContext(option =>
    {
        option.Connections = new List<LiteDBConnection>
        {
            new LiteDBConnection("DatabaseA", "Filename=DatabaseA.db; Mode=Shared; Password=****;"),
            new LiteDBConnection("DatabaseB", "Filename=DatabaseB.db; Mode=Shared; Password=****;")
        };
    });
var uow = new LiteDB.Core.UnitOfWork(context);

//MongoDB
var context = MongoDB.Support.Extensions.BuildDbContext(option =>
    {
        option.Connections = new List<MongoDBConnection>
        {
            new MongoDBConnection("DatabaseA", "mongodb+srv://Username:****@Cluster"),
            new MongoDBConnection("DatabaseB", "mongodb+srv://Username:****@Cluster")
        };
    });
var uow = new MongoDB.Core.UnitOfWork(context);

2. Inject and Use as required

    [ApiController]
    public class HomeController : ControllerBase 
    {
        private readonly UnitOfWork uow;

        public HomeController(UnitOfWork uow)
        {
            this.uow = uow;
        }

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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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.

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.6.0 143 1/21/2024
2.5.0 74 1/21/2024
2.4.0 104 1/6/2024
2.3.0 143 6/21/2023
2.2.0 124 6/21/2023