Skip to content

streamx-co/try.elinq

Repository files navigation

ELINQ (Entity LINQ)

Interactive demo ⇒ Try_.NET Enabled nuget nuget

ELINQ is a Language Integrated Query (LINQ) technology for relational (SQL) databases and EF Core. It allows you to use C# (or your .NET language of choice) to write strongly typed SQL queries.

Don't we have LINQ for EF already?

ELINQ enhances LINQ with new capabilities:

  • Full power of C# for query creation: multiple statements inside lambda, variables, functions, etc.
  • No semantic gap with SQL. ELINQ declares SQL statements (like SELECT, FROM, WHERE) as first class C# methods, combining familiar syntax with intellisense, type safety and refactoring.
  • No limitations. Any practical DML SQL can be expressed with C# elegance.

With ELINQ SQL becomes just "another" class library exposing its API locally, literally "Language Integrated SQL".

Demo

We took popular SQL tutorials and implemented all examples from them using ELINQ. We want to emphasize that any practical DML SQL can be expressed with ELINQ with no compromises.

This site is built with a wonderful Try .NET technology. All the examples are interactive, intellisense enabled and runnable with changes you may make. Enjoy!

EF Core Integration

By integrating with EF, ELINQ maps EF entities to SQL table and column names. The final SQL statement is passed to FromSqlRaw method, which returns a standard IQueryable. As a result, the regular EF pipeline is used for execution. Calls to other EF methods can be freely combined with ELINQ.

SQL Support

ELINQ fully supports the modern SQL DML standard. In addition to conventional relational SQL (SQL-92), ELINQ supports SQL-99 Common Table Expressions (WITH clause), SQL-2003 Window Functions (OVER clause), SQL-2003 MERGE (UPSERT clause), Dynamic Queries and many, many more.

Where can I get ELINQ?

About

Language Integrated Query (LINQ) technology for relational databases and EF Core

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages