Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Ejlskov Jensen ErikEJ

View GitHub Profile
@ErikEJ
ErikEJ / IQueryableExtensions.cs
Last active Jun 8, 2021
Replacement for EF Core .Contains, that avoids SQL Server plan cache pollution
View IQueryableExtensions.cs
public static class IQueryableExtensions
{
public static IQueryable<TQuery> In<TKey, TQuery>(
this IQueryable<TQuery> queryable,
IEnumerable<TKey> values,
Expression<Func<TQuery, TKey>> keySelector)
{
if (values == null)
{
@ErikEJ
ErikEJ / App.config
Created Jan 27, 2019
SQL Server Compact private deployment
View App.config
<runtime>
<gcServer enabled="true" />
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SqlServerCe" publicKeyToken="89845dcd8080cc91" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0-4.0.0.1" newVersion="4.0.0.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>