Try .NET /elinq/
Powered by Try .NET

Sakila Homework

Interactive demo ⇒ Try_.NET Enabled

ELINQ allows you to use C# (or your .NET language of choice) to write strongly typed queries. It is capable to represent any practical SQL DML.

Sakila is a popular sample database developed by MySQL. Many institutions build their SQL exams and homeworks on this database (Google for "Sakila Homework").

To demonstrate ELINQ capabilities we took questions from one such homework and implemented them in C# and ELINQ in a strongly typed way. Our goal is to show "pixel-perfect" SQL translation, EF integration, type safety and ease of use (we take the example as is, without trying to improve SQL).

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!

All the examples are executed against a real database, created according to provided instructions. The DbContext is scaffolded with EF tooling in a separate project hosted on GitHub.

All queries are executed in a transaction, which is rolled back at the end. Therefore no changes are persisted and each query can be executed multiple times producing same results. In addition we installed a console logger to inspect the executed SQL.