Setup
To run locally examples from this tutorial follow these instructions.
Project Setup
-
Add using declarations:
using Streamx.Linq.SQL.EFCore;
using Streamx.Linq.SQL.<vendor>;
using static Streamx.Linq.SQL.SQL;
using static Streamx.Linq.SQL.<vendor>.SQL;
using static Streamx.Linq.SQL.Library;
using static Streamx.Linq.SQL.Directives;
using static Streamx.Linq.SQL.AggregateFunctions;
using static Streamx.Linq.SQL.Operators;
using static Streamx.Linq.SQL.ScalarFunctions;
-
Register capabilities:
Registers vendor SQL dialect and language substitutions, like
String.Length => LENGTH(String)
. Should be done only once, for example insideOnModelCreating()
of your DbContext:protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); ELinq.Configuration.RegisterVendorCapabilities(); ... }