Skip to content

Instantly share code, notes, and snippets.

@jinan-kordab
Created May 28, 2018 00:47
Show Gist options
  • Save jinan-kordab/c9128691e8d0da6223b5075d681fa868 to your computer and use it in GitHub Desktop.
Save jinan-kordab/c9128691e8d0da6223b5075d681fa868 to your computer and use it in GitHub Desktop.
Compiled Query example for very fast read and insert
static readonly Func<LRT3FKDataContext, short, IQueryable<LRT3FK>> s_compiledQuery =
System.Data.Linq.CompiledQuery.Compile<LRT3FKDataContext, short, IQueryable<LRT3FK>>(
(ctx, PKID) => from dr in ctx.LRT3FKs
where dr.PKID == PKID
select dr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment