Announcing Starcounter.Linq – use LINQ with database objects

December 6, 2017 2:11 pm Published by Leave your thoughts

Starting 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:

If you have any feedback or feature request, post in the Starcounter.Linq repository.

Categorised in:

This post was written by Erlend Landrö

Leave a Reply

Your email address will not be published. Required fields are marked *