Skip to content

Solidb is a Dynamic .NET micro ORM with change tracking observable objects.

License

Notifications You must be signed in to change notification settings

Theoistic/Solidb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidb

Solidb is a Dynamic .NET micro ORM with change tracking observable objects.

Installation

From Nuget.Org

PM> Install-Package Solidb

How

Solidbase is a List just like how List is used. you can take and create a new Solidbase list

Solidbase list = new Solidbase<User>();

Since in the background it's all build upon the IDbConnection interface we need to tell Solidb where to look and store stuff. so before we create the lists we need to create a strategy as seen below, where it resolves to a SqlConnection. Solidbase uses this to connect to the various databases, If a Solidbase Strategy is not set, it will default to a SQLite database.

Solidbase.Strategy = () => new SqlConnection("Server=.\\SQLEXPRESS;Database=NewSolidb;Trusted_Connection=True;");

setting "Random" as the table and then injecting a anonymous type, afterwards fetching the inserted object and changing it by adding a new property to the object as "newStuff".

Solidbase list = new Solidbase("Random");
list.Add(new { Id = list.NextId, content = "rainbow" });
var latest = list.Last();
latest.newStuff = "something else";

Or using a generic type argument

Solidbase list = new Solidbase<Product>();
list.Add(new { Id = list.NextId, Price = 1.0 });

About

Solidb is a Dynamic .NET micro ORM with change tracking observable objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages