LothiumDB 1.1.1
See the version list below for details.
dotnet add package LothiumDB --version 1.1.1
NuGet\Install-Package LothiumDB -Version 1.1.1
<PackageReference Include="LothiumDB" Version="1.1.1" />
paket add LothiumDB --version 1.1.1
#r "nuget: LothiumDB, 1.1.1"
// 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
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 | Versions 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. |
-
net6.0
- Microsoft.Data.SqlClient (>= 5.1.1)
- MySql.Data (>= 8.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fix some error while executing the FetchAll and FetchSingle Methods