Skip to content

Instantly share code, notes, and snippets.

View ErikEJ's full-sized avatar

Erik Ejlskov Jensen ErikEJ

View GitHub Profile
@ErikEJ
ErikEJ / App.config
Created January 27, 2019 14:00
SQL Server Compact private deployment
<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>
@ErikEJ
ErikEJ / IQueryableExtensions.cs
Last active June 14, 2024 19:25
Replacement for EF Core .Contains, that avoids SQL Server plan cache pollution
using System.Linq.Expressions;
namespace Microsoft.EntityFrameworkCore
{
public static class IQueryableExtensions
{
public static IQueryable<TQuery> In<TKey, TQuery>(
this IQueryable<TQuery> queryable,
IEnumerable<TKey> values,
Expression<Func<TQuery, TKey>> keySelector)
@ErikEJ
ErikEJ / oredev-cta.md
Last active November 7, 2024 07:21
OreDev CTA