コード例 #1
0
        public bool ShouldRegenerate(IDocumentSchema schema)
        {
            if (!schema.DocumentTables().Contains(TableName))
            {
                return(true);
            }

            var existing = schema.TableSchema(TableName);
            var expected = ToTable(schema);

            return(!expected.Equals(existing));
        }
        public when_deriving_the_table_definition_from_the_database_schema_Tests()
        {
            _schema = theStore.Schema;

            theMapping = _schema.MappingFor(typeof(User)).As<DocumentMapping>();
            theMapping.DuplicateField("UserName");


            _storage = _schema.StorageFor(typeof(User));

            theDerivedTable = _schema.TableSchema(theMapping);
        }