public JObject Delete(Guid id, string contentType) { JObject entity = area.Get(id); using (PipelineContext context = pipeline.CreateContext(contentType, entity)) { pipeline.ExecuteBeforeDelete(entity, contentType, context); JObject deleted = performance.TrackFunction(() => area.Delete(id), TRACK_TYPE, new { fn = $"ContentService.Delete({id}, {contentType})" }); //TODO: Throw exception if not found? if (deleted == null) { return(null); } manager.QueueDelete(deleted); return(pipeline.ExecuteAfterDelete(deleted, contentType, context)); } }