EntitySpaces.ORM.SQLite 2020.1.3

EntitySpaces in .NET Standard Mode for SQLite (single assembly install)

There is a newer version of this package available.
See the version list below for details.
Install-Package EntitySpaces.ORM.SQLite -Version 2020.1.3
dotnet add package EntitySpaces.ORM.SQLite --version 2020.1.3
<PackageReference Include="EntitySpaces.ORM.SQLite" Version="2020.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EntitySpaces.ORM.SQLite --version 2020.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

A Fluent SQL API

EntitySpaces is a Fluent API for SQL Server, SQLite, MySQL, PostgreSQL, and more on the way. If you are familiar with the SQL syntax then you are already an EntitySpaces expert. EntitySpaces is also high performance, transactional, and very intuitive. EntitySpaces Studio is used to generate your C# classes from your database schema.

Example Query

In this example we are going to sum the total # of items for each order. Each order can have many order detail records so we group our query by OrderId and sum up the quantity as 'TotalQuantity'. Notice that we can access the derived 'TotalQuantity' column through the dynamic property.

OrdersCollection coll = new OrdersQuery("o", out var o)
    .InnerJoin<OrderDetailsQuery>("od", out var od).On(o.OrderID == od.OrderID)
    .Select(o.OrderID, od.Quantity.Sum().As("TotalQuantity"))
    .GroupBy(o.OrderID)
    .OrderBy(o.OrderID.Ascending)
    .ToCollection<OrdersCollection>();

foreach(Orders order in coll)
{
    Console.WriteLine(order.OrderID + " : " + order.dynamic.TotalQuantity);
}

The SQL generated is just as you would expect.

SELECT o.[OrderID], SUM(od.[Quantity]) AS 'TotalQuantity'  
FROM [Orders] o 
INNER JOIN [Order Details] od ON o.[OrderID] = od.[OrderID] 
GROUP BY o.[OrderID] 
ORDER BY o.[OrderID] ASC

A Fluent SQL API

EntitySpaces is a Fluent API for SQL Server, SQLite, MySQL, PostgreSQL, and more on the way. If you are familiar with the SQL syntax then you are already an EntitySpaces expert. EntitySpaces is also high performance, transactional, and very intuitive. EntitySpaces Studio is used to generate your C# classes from your database schema.

Example Query

In this example we are going to sum the total # of items for each order. Each order can have many order detail records so we group our query by OrderId and sum up the quantity as 'TotalQuantity'. Notice that we can access the derived 'TotalQuantity' column through the dynamic property.

OrdersCollection coll = new OrdersQuery("o", out var o)
    .InnerJoin<OrderDetailsQuery>("od", out var od).On(o.OrderID == od.OrderID)
    .Select(o.OrderID, od.Quantity.Sum().As("TotalQuantity"))
    .GroupBy(o.OrderID)
    .OrderBy(o.OrderID.Ascending)
    .ToCollection<OrdersCollection>();

foreach(Orders order in coll)
{
    Console.WriteLine(order.OrderID + " : " + order.dynamic.TotalQuantity);
}

The SQL generated is just as you would expect.

SELECT o.[OrderID], SUM(od.[Quantity]) AS 'TotalQuantity'  
FROM [Orders] o 
INNER JOIN [Order Details] od ON o.[OrderID] = od.[OrderID] 
GROUP BY o.[OrderID] 
ORDER BY o.[OrderID] ASC

Release Notes

esEntity.dynamic tweak

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2020.1.15 217 1/15/2020
2020.1.3 137 1/3/2020
2019.12.20 141 12/20/2019
2019.12.19.1 152 12/18/2019
2019.12.18 139 12/18/2019