当前位置: 首页>>代码示例>>C#>>正文


C# PropertyMapping.AddColumn方法代码示例

本文整理汇总了C#中FluentNHibernate.MappingModel.PropertyMapping.AddColumn方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyMapping.AddColumn方法的具体用法?C# PropertyMapping.AddColumn怎么用?C# PropertyMapping.AddColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FluentNHibernate.MappingModel.PropertyMapping的用法示例。


在下文中一共展示了PropertyMapping.AddColumn方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShouldWriteColumns

        public void ShouldWriteColumns()
        {
            var mapping = new PropertyMapping();

            mapping.AddColumn(new ColumnMapping { Name = "Column1" });

            writer.VerifyXml(mapping)
                .Element("column").Exists();
        }
开发者ID:sbakshi,项目名称:fluent-nhibernate,代码行数:9,代码来源:XmlPropertyWriterTester.cs

示例2: CollectionContainsWithStringShouldBeFalseWhenNoItemsMatching

        public void CollectionContainsWithStringShouldBeFalseWhenNoItemsMatching()
        {
            acceptance
                .Expect(x => x.Columns.Contains("boo"));

            var mapping = new PropertyMapping();
            mapping.AddColumn(new ColumnMapping { Name = "Column1" });

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeFalse();
        }
开发者ID:roelofb,项目名称:fluent-nhibernate,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例3: CollectionIsNotEmptyShouldBeTrueWithItemsWhenUsingExpression

        public void CollectionIsNotEmptyShouldBeTrueWithItemsWhenUsingExpression()
        {
            acceptance
                .Expect(x => x.Columns.IsNotEmpty());

            var mapping = new PropertyMapping();
            mapping.AddColumn(new ColumnMapping { Name = "Column1" });

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeTrue();
        }
开发者ID:roelofb,项目名称:fluent-nhibernate,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例4: CollectionIsEmptyShouldBeFalseWithItemsWhenUsingExpression

        public void CollectionIsEmptyShouldBeFalseWithItemsWhenUsingExpression()
        {
            acceptance
                .Expect(x => x.Columns.IsEmpty());

            var mapping = new PropertyMapping();
            mapping.AddColumn(Layer.Defaults, new ColumnMapping("Column1"));

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeFalse();
        }
开发者ID:jjchoi,项目名称:fluent-nhibernate,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例5: CollectionContainsWithLambdaShouldBeTrueWhenItemsMatching

        public void CollectionContainsWithLambdaShouldBeTrueWhenItemsMatching()
        {
            acceptance
                .Expect(x => x.Columns.Contains(c => c.Name == "Column1"));

            var mapping = new PropertyMapping();
            mapping.AddColumn(new ColumnMapping { Name = "Column1" });

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeTrue();
        }
开发者ID:heyitsanewb,项目名称:PokeWorld-Online,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例6: GetPropertyMapping

        private PropertyMapping GetPropertyMapping(Type type, Member property)
        {
            var mapping = new PropertyMapping
            {
                ContainingEntityType = type,
                Member = property
            };

            var columnMapping = new ColumnMapping();
            columnMapping.Set(x => x.Name, Layer.Defaults, property.Name);
            mapping.AddColumn(Layer.Defaults, columnMapping);

            mapping.Set(x => x.Name, Layer.Defaults, mapping.Member.Name);
            mapping.Set(x => x.Type, Layer.Defaults, GetDefaultType(property));

            SetDefaultAccess(property, mapping);

            return mapping;
        }
开发者ID:akhuang,项目名称:NHibernateTest,代码行数:19,代码来源:PropertyStep.cs

示例7: CollectionContainsWithLambdaShouldBeFalseWhenNoItemsMatching

        public void CollectionContainsWithLambdaShouldBeFalseWhenNoItemsMatching()
        {
            acceptance
                .Expect(x => x.Columns.Contains(c => c.Name == "boo"));

            var mapping = new PropertyMapping();
            mapping.AddColumn(Layer.Defaults, new ColumnMapping("Column1"));

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeFalse();
        }
开发者ID:jjchoi,项目名称:fluent-nhibernate,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例8: CollectionContainsWithStringShouldBeTrueWhenItemsMatching

        public void CollectionContainsWithStringShouldBeTrueWhenItemsMatching()
        {
            acceptance
                .Expect(x => x.Columns.Contains("Column1"));

            var mapping = new PropertyMapping();
            mapping.AddColumn(Layer.Defaults, new ColumnMapping("Column1"));

            acceptance
                .Matches(new PropertyInspector(mapping))
                .ShouldBeTrue();
        }
开发者ID:jjchoi,项目名称:fluent-nhibernate,代码行数:12,代码来源:PropertyAcceptanceCriteriaCollectionTests.cs

示例9: property_with_column

 protected PropertyMapping property_with_column(string column)
 {
     var property = new PropertyMapping();
     property.AddColumn(Layer.Defaults, new ColumnMapping("propertyColumn"));
     return property;
 }
开发者ID:oblivious,项目名称:Oblivious,代码行数:6,代码来源:ComponentColumnPrefixVisitorSpecs.cs

示例10: ShouldWriteColumns

        public void ShouldWriteColumns()
        {
            var mapping = new PropertyMapping();

            mapping.AddColumn(Layer.Defaults, new ColumnMapping("Column1"));

            writer.VerifyXml(mapping)
                .Element("column").Exists();
        }
开发者ID:nsreddy1986,项目名称:fluent-nhibernate,代码行数:9,代码来源:XmlPropertyWriterTester.cs


注:本文中的FluentNHibernate.MappingModel.PropertyMapping.AddColumn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。