コード例 #1
0
        public void AddMigrationError(MigrationVersion version, DocumentMigrationError documentMigrationError)
        {
            var d = new Dictionary <string, object> {
                { "DocumentId", new BsonString(documentMigrationError.DocumentId) },
                { "Error", new BsonString(documentMigrationError.Error) }
            };

            GetMigrationsCollection().Update(Query.EQ("_id", new BsonString(version.ToString())), Update.Push("FailedMigrations", new BsonDocument(d)));
        }
コード例 #2
0
 public virtual void SetMigrationLastId(MigrationVersion version, string id)
 {
     GetMigrationsCollection().Update(Query.EQ("_id", new BsonString(version.ToString())), Update.Set("LastCompletedId", id).Inc("CompletedCount", 1));
 }