public void Handle(DeleteMetadataDefinitionCommand command)
        {
            var definition = _repository.Get(command.Identity);

            definition.Foreach(x => x.Delete());
            _repository.Save(definition);
        }
        public HttpResponseMessage Delete(Guid identity)
        {
            _logWriter.Info(String.Format("Deletion request for Metadata Definition : {0}", identity));

            var current = _metadataDefinitonReadService.FindByIdentity(identity);

            return current.Fold(_ =>
            {
                var command = new DeleteMetadataDefinitionCommand(identity);
                _dispatcher.Dispatch(command);

                _logWriter.Info(String.Format("Deletion request for Metadata Definition : {0} completed.", identity));
                return Request.CreateResponse(HttpStatusCode.OK);
            }, () => Request.CreateErrorResponse(HttpStatusCode.NotFound, "Metadata Definition Resource Not Found"));
        }