LothiumDB 1.1.1

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

// Install LothiumDB as a Cake Tool
#tool nuget:?package=LothiumDB&version=1.1.1                

LothiumDB NuGet Version NuGet Downloads

LothiumDB is a simple micro ORM for .Net applications written entirely in C# for fun and offer a lot of different methods to fecth data in and out of a database.

var db = new Database<DbProviderClass>(connectionString);
var sql = new SqlBuilder().Select("*").From("TableName");
db.Query<PocoObject>(sql);

LothiumDB have a very simple syntax and give flexybility to the final user if he want to use a query written inside a string variable, or using the SqlBuilder class.

var obj = new PocoObject();
obj.Prop1 = "Prop1";
obj.Prop2 = "Prop2";

db.Insert(obj);
db.Update(obj);
db.Delete(obj);

LothiumDB offers the ability to work with Poco Object to make operations inside the database. The library work well when a Poco Object have inside it all the needed attribute, infact all the information about the associated table and column will be extracted automatically.

using LothiumDB.Attributes;
namespace TestModels
{
    [Serializable]
    [TableName("TableName")]
    [PrimaryKey("Prop1")]
    public class TabellaDiTest
    {
        [ColumnName("Prop1")]
        public string? Property1 { get; set; }

        [ColumnName("Prop2")]
        public string? Property2 { get; set; }
        
		[ExcludeColumn()]
        public string? Property3 { get; set; }
    }
}

Getting started

You can install LothiumDB directly from NuGet using the NuGet Manager inside Visual Studio or with this command:

dotnet add package LothiumDB

The simplest way to set up LothiumDB is using the Database class and the SqlBuilder query constructor.

using LothiumDB;

public class Program
{
	var db = new  Database<DbProviderClass>(connectionString); 
	
	var sql = new SqlBuilder().Select("*").From("TableName"); 
	List<PocoObject> list = db.FetchAll<PocoObject>(sql);

	var sql2 = new SqlBuilder().SelectTop(1, "*").From("TableName"); 
	PocoObject pocoObj = db.FetchSingle<PocoObject>(sql);
}

Bug Reports

If you want to contribute to this project, you can send a pull request to the GitHub Repository and i'll be happy to add it to the project. In The feature i'll separate the Master Branch from the Develop Branch

I welcome any type of bug reports and suggestions through my GitHub Issue Tracker.

LothiumDB is copyright © 2023 - Provided under the GNU General Public License v3.0.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
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.2.0 244 10/15/2023
1.1.3 173 8/28/2023
1.1.2 195 8/24/2023 1.1.2 is deprecated because it has critical bugs.
1.1.1 219 8/11/2023
1.1.0 165 7/23/2023
1.0.0.1 200 7/15/2023

Fix some error while executing the FetchAll and FetchSingle Methods