EntitySpaces.ORM.SqlServer 2019.7.23.1

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

// Install EntitySpaces.ORM.SqlServer as a Cake Tool
#tool nuget:?package=EntitySpaces.ORM.SqlServer&version=2019.7.23.1

A Very Simple Example

The sample below demonstrates a self join on the Employees table which is looking for all employees with an 'a' in their last name who have people reporting to them. Kind of silly but it shows off the syntax. More samples available here I'm an inline-style link with title

Query and Load

Notice we're creating a "fullName" column on the fly and will be in our JSON as we expect as shown below

EmployeesQuery e = new EmployeesQuery("e");
e.Select
(
     e.EmployeeID, 
     e.LastName, e.FirstName, 
    (e.LastName + ", " + e.FirstName).As("fullName")
)
.OrderBy(e.LastName.Descending);

EmployeesCollection coll = new EmployeesCollection();
if (coll.Load(e))
{
    // We loaded at least one record
}

Notice that the SQL is extremely lean.

NOTE: InnerJoin, RightJoin, LeftJoin, CrossJoin, and FullJoin are all supported, basically the entire SQL API is supported.

SQL Generated and executed from the Query Above

SELECT 
    e.[EmployeeID], 
    e.[LastName], 
    e.[FirstName], 
   (e.[LastName] + ', ' + e.[FirstName]) AS 'fullName'  
FROM [Employees] e 
ORDER BY e.[LastName] DESC

Compare that SQL to the SQL generated by a Entity Framework query which does the same thing and you'll be shocked.

JSON resulting from Serialization.

Notice the "fullName" is present, no need to 'new' an anonymous object as extra columns just magically appear

[
  {
    "EmployeeID": 6,
    "LastName": "Suyama",
    "FirstName": "Michael",
    "fullName": "Suyama, Michael"
  },
  {
    "EmployeeID": 33,
    "LastName": "Smith",
    "FirstName": "Joe",
    "fullName": "Smith, Joe"
  },
  {
    "EmployeeID": 31,
    "LastName": "Smith",
    "FirstName": "Frank",
    "fullName": "Smith, Frank"
  }
]
There are no supported framework assets in this 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
2020.2.1 3,184 2/1/2020
2020.1.15.1 990 1/15/2020
2020.1.15 982 1/15/2020
2020.1.10 1,052 1/10/2020
2020.1.3 975 1/3/2020
2019.12.20 1,013 12/20/2019
2019.12.18 970 12/18/2019
2019.12.16 971 12/16/2019
2019.12.14 938 12/14/2019
2019.12.12 969 12/12/2019
2019.12.9 955 12/9/2019
2019.12.8.1 958 12/9/2019
2019.12.8 955 12/9/2019
2019.12.5 941 12/6/2019
2019.11.21 1,001 11/21/2019
2019.11.20 969 11/20/2019
2019.11.14 1,420 11/14/2019
2019.11.6 995 11/6/2019
2019.11.4.1 1,045 11/4/2019
2019.11.4 935 11/4/2019
2019.9.20 1,062 9/20/2019
2019.8.28 1,036 8/28/2019
2019.8.27.1 968 8/27/2019
2019.8.27 1,004 8/27/2019
2019.8.26 940 8/26/2019
2019.8.23 986 8/23/2019
2019.8.22 936 8/22/2019
2019.8.14 960 8/14/2019
2019.8.13 973 8/13/2019
2019.8.7 990 8/8/2019
2019.7.31 1,066 7/31/2019
2019.7.23.4 1,000 7/23/2019
2019.7.23.3 1,808 7/23/2019
2019.7.23.2 2,085 7/23/2019
2019.7.23.1 2,044 7/23/2019
2019.7.23 1,997 7/23/2019
2019.7.22 992 7/22/2019
2019.7.19.1 1,015 7/19/2019
2019.7.19 987 7/19/2019
2019.7.7.2 1,007 7/8/2019
2019.7.7.1 1,032 7/8/2019
2019.7.7 1,025 7/8/2019
1.0.0 1,036 7/1/2019