Skip to content

Instantly share code, notes, and snippets.

@kirilpoq
kirilpoq / CreatedAndModifiedDateInterceptor.cs
Created November 7, 2016 09:04 — forked from marisks/CreatedAndModifiedDateInterceptor.cs
Entity Framework soft delete, modiefied and created date interceptors
using System;
using System.Data.Entity.Core.Common.CommandTrees;
using System.Data.Entity.Core.Metadata.Edm;
using System.Data.Entity.Infrastructure.Interception;
using System.Linq;
public class CreatedAndModifiedDateInterceptor : IDbCommandTreeInterceptor
{
public const string CreatedColumnName = "Created";
public const string ModifiedColumnName = "Modified";