public override void Up()
        {
            var collection = GetCollection("Animals");
            var document   = new BsonDocument();

            document.AddUniqueIdentifier(new Guid("2A7B73A8-3C4A-422D-90B4-C73BCF48EBD4"));
            document.AddProperty("Kind", "Cat");

            collection.InsertOne(document);
        }
Пример #2
0
        public override void Up()
        {
            var collection = GetCollection("Persons");
            var document   = new BsonDocument();

            document.AddUniqueIdentifier(new Guid("06BFFCF5-DAE9-422A-85AB-F58DE41E86DA"));
            document.AddProperty("Name", "John Doe");

            collection.InsertOne(document);
        }
        public void AddUniqueIdentifierFact()
        {
            // Arrange
            var value    = Guid.NewGuid();
            var document = new BsonDocument();

            // Act
            document.AddUniqueIdentifier(value);
            var element = document.GetElement("_id");

            // Assert
            element.Should().NotBeNull();
            element.Value.Should().Be(value);
        }
Пример #4
0
        public override void Up()
        {
            var collection = GetCollection("ilevus_ads_log");
            var document   = new BsonDocument();

            document.AddUniqueIdentifier(new Guid("06BFFCF5-DAE9-422A-85AB-F58DE41E86DA"));
            document.AddProperty("user_id", "");
            document.AddProperty("user_nome", "Administrador");
            document.AddProperty("user_email", "*****@*****.**");
            document.AddProperty("ad_id", "");
            document.AddProperty("status", "Approved");
            document.AddProperty("date", DateTime.Now);

            collection.InsertOne(document);
        }