Exemple #1
0
        public void Add(Models.TextContent content)
        {
            content.Remove("_id");

            content.StoreFiles();

            ((IPersistable)content).OnSaving();
            var database = content.GetRepository().GetDatabase();
            MongoCollection <BsonDocument> collection = database.GetCollection(content.GetSchema().GetSchemaCollectionName());

            collection.Insert(content.ToBsonDocument());
            ((IPersistable)content).OnSaved();
        }