Announcing Starcounter.Linq – use LINQ with database objects
December 6, 2017 2:11 pm Leave your thoughtsStarting today, you can query database objects with LINQ. It supports ad-hoc and compiled queries:
// ad-hoc request
var johns = DbLinq.Objects<Person>().Where(p => p.Name == "John");
// request using compiled query
var peopleByNameQuery = DbLinq.CompileQuery((string name) =>
DbLinq.Objects<Person>().Where(p => p.Name == name));
var jennifers = peopleByNameQuery("Jennifer");
Starcounter.Linq is published with NuGet: https://www.nuget.org/packages/Starcounter.Linq/.
If you have any feedback or feature request, post in the Starcounter.Linq repository.
Categorised in: Development
This post was written by Erlend Landrö