示例#1
0
        public void Delete(Models.TextContent content)
        {
            var bucket = content.GetRepository().GetClient();

            bucket.ExecuteRemove(content.UUID, PersistTo.One);
            TextContentFileHelper.DeleteFiles(content);
        }
示例#2
0
        public void Delete(Models.TextContent content)
        {
            var database = content.GetRepository().GetDatabase();
            MongoCollection <BsonDocument> collection = database.GetCollection(content.GetSchema().GetSchemaCollectionName());
            var query = new QueryDocument {
                { "UUID", content.UUID }
            };

            collection.Remove(query);
            TextContentFileHelper.DeleteFiles(content);
        }
示例#3
0
        public void Delete(Models.TextContent content)
        {
            var command = dbCommands.Delete(content);

            if (SQLCeTransactionUnit.Current != null)
            {
                SQLCeTransactionUnit.Current.RegisterCommand(command);
                SQLCeTransactionUnit.Current.RegisterPostAction(delegate() { TextContentFileHelper.DeleteFiles(content); });
            }
            else
            {
                SQLCeHelper.ExecuteNonQuery(content.GetRepository().GetConnectionString(), command);
                TextContentFileHelper.DeleteFiles(content);
            }
        }