Skip to content

Instantly share code, notes, and snippets.

View neilgaietto's full-sized avatar
👁️‍🗨️

Neil Gaietto neilgaietto

👁️‍🗨️
View GitHub Profile
@neilgaietto
neilgaietto / EFExtensions.cs
Last active July 18, 2018 20:36 — forked from ondravondra/EFExtensions.cs
C# extension for executing Async upsert (MERGE SQL command) in EF with MSSQL. Multi Column keys support
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace EFExtensions
@neilgaietto
neilgaietto / Umbraco-Full-Cleanup.sql
Last active October 21, 2016 14:44 — forked from Hendy/DeleteAllVersions.sql
Umbraco - delete version history for all content
/* This script deletes:
* 1. Oprhan data
* 2. All nodes from the trash
* 3. All previous node versions which are not publish or not newest unpublished
*/
DECLARE @documentNodeObjectType uniqueidentifier = N'C66BA18E-EAF3-4CFF-8A22-41B16D66A972';
DECLARE @trashPath varchar(5) = '%-20%';
PRINT 'orphan data'