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


C# IOneToManyCollectionInstance类代码示例

本文整理汇总了C#中IOneToManyCollectionInstance的典型用法代码示例。如果您正苦于以下问题:C# IOneToManyCollectionInstance类的具体用法?C# IOneToManyCollectionInstance怎么用?C# IOneToManyCollectionInstance使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Access.CamelCaseField(CamelCasePrefix.Underscore);
     instance.Access.ReadOnlyPropertyThroughCamelCaseField(CamelCasePrefix.Underscore);
     instance.Cascade.All();
     instance.Inverse();
 }
开发者ID:HarmonyHacks,项目名称:Dahlia,代码行数:7,代码来源:HasManyConvention.cs

示例2: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Key.Column(instance.EntityType.Name + "Id");
     instance.Key.ForeignKey(instance.EntityType.Name + "_" + instance.ChildType.Name + "_FK");
     instance.Cascade.AllDeleteOrphan();
     instance.Inverse();
 }
开发者ID:vincentzh,项目名称:aqh_daily_report,代码行数:7,代码来源:HasManyConvention.cs

示例3: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Key.Column(instance.EntityType.Name + "Id");
     instance.Inverse();
     instance.Access.CamelCaseField();
     instance.Cascade.AllDeleteOrphan();
 }
开发者ID:snahider,项目名称:Spring.Net-Workshop,代码行数:7,代码来源:HasManyConvention.cs

示例4: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     if (instance.TableName != null)
     {
         instance.Table(AlterTableName(instance.TableName));
     }
 }
开发者ID:sam-adam,项目名称:LearningDDD,代码行数:7,代码来源:TableNameConvention.cs

示例5: Apply

        public void Apply(IOneToManyCollectionInstance instance)
        {
            string entity = instance.EntityType.Name;
            string member = instance.Member.Name;
            string child = instance.ChildType.Name;

            instance.Key.ForeignKey($"FK_{entity}{member}_{child}");
        }
开发者ID:devworker55,项目名称:Mammatus,代码行数:8,代码来源:ForeignKeyConstraintNames.cs

示例6: Apply

        public void Apply(IOneToManyCollectionInstance instance)
        {
            string entity = instance.EntityType.Name;
            string member = instance.Member.Name;
            string child = instance.ChildType.Name;

            instance.Key.ForeignKey(string.Format("FK_{0}{1}_{2}", entity, member, child));
        }
开发者ID:llenroc,项目名称:Inflexion2,代码行数:8,代码来源:ForeignKeyConstraintNames.cs

示例7: Apply

		public void Apply(IOneToManyCollectionInstance instance)
		{
			var abbreviation = AttributeHelper.GetTypeAttribute<AbbreviationAttribute>(instance.EntityType);
			var prefix = abbreviation == null
				? instance.EntityType.Name
				: abbreviation.Abbreviation;
			instance.Key.Column((prefix + "Id").EscapeColumnName());
		}
开发者ID:seatwave,项目名称:Quarks,代码行数:8,代码来源:KeyColumn.cs

示例8: Apply

        public void Apply(IOneToManyCollectionInstance instance)
        {
            instance.Key.Column(instance.EntityType.Name + "Fk");

            instance.BatchSize(5);

            instance.Cascade.All();
        }
开发者ID:NonameProject,项目名称:Noname,代码行数:8,代码来源:HasManyConvention.cs

示例9: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     //foreach (var column in  instance.Key.Columns.OfType<ColumnInstance>()) {
     //    column.Set(x => x.Name, Layer.Defaults, column.Name.ToCamelCase());
     //}
     instance.Key.Column(string.Format("[{0}_id]", instance.Member.Name.ToCamelCase()));
     //instance.Key.Column(string.Format("[{0}_revision]", instance.Member.Name.ToCamelCase()));
 }
开发者ID:umittal,项目名称:MunimJi,代码行数:8,代码来源:ForeignKeyNamingConvention.cs

示例10: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     var originName = ConventionsUtilities
         .CamelCaseToUpperCaseWithUnderscoreSeparator(instance.Member.Name);
     var targetName = ConventionsUtilities
         .CamelCaseToUpperCaseWithUnderscoreSeparator(instance.EntityType.Name);
     instance.Key.ForeignKey(String.Format("FK_{0}_{1}",
         originName, targetName));
 }
开发者ID:lordviktor,项目名称:erp-project,代码行数:9,代码来源:ForeignKeyConstraintNameConvention.cs

示例11: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     if (instance.TableName.IsNotNull())
     {
         instance.Table(
             string.Format("`{0}_{1}`", Prefix, instance.TableName.Replace("`", ""))
         );
     }
 }
开发者ID:gofixiao,项目名称:Macsauto-Backup,代码行数:9,代码来源:TableNameConvention.cs

示例12: Apply

        public void Apply(IOneToManyCollectionInstance instance)
        {
            var tableName = GetTableName(instance);

            instance.AsSet();
            instance.Table(tableName);
            instance.CollectionType<PersistentMultiCultureStringType>();
            instance.Cascade.AllDeleteOrphan();
        }
开发者ID:sadowskik,项目名称:MultiCultureString,代码行数:9,代码来源:McsConvention.cs

示例13: Apply

        public void Apply(IOneToManyCollectionInstance instance)
        {
            instance.Key.Column(instance.EntityType.Name + "Id");
            var parent = instance.Relationship.EntityType.Name.Pluralize();
            instance.Key.ForeignKey(
                $"FK_{instance.StringIdentifierForModel.Pluralize()}_For_{parent}");

            instance.Cascade.AllDeleteOrphan();
            instance.Inverse();
        }
开发者ID:sharparchitecture,项目名称:Sharp-Architecture,代码行数:10,代码来源:HasManyConvention.cs

示例14: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Cache.ReadWrite();
     instance.Cascade.SaveUpdate();
     instance.Cascade.AllDeleteOrphan();
     instance.Fetch.Subselect();
     instance.Inverse();
     instance.Relationship.NotFound.Ignore();
     instance.Key.ForeignKey(string.Format("FK_{0}_{1}", instance.ChildType.Name, instance.EntityType.Name));
     instance.Where("(IsDeleted = 'False' or IsDeleted = 0 or IsDeleted is null)");
 }
开发者ID:neozhu,项目名称:MrCMS,代码行数:11,代码来源:HasManyConvention.cs

示例15: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.LazyLoad();
     instance.BatchSize(5);
     instance.Access.CamelCaseField(CamelCasePrefix.Underscore);
     instance.Cascade.All();
     instance.Key.Column(Inflector.Underscore(instance.EntityType.Name) + "_id");
     instance.Key.ForeignKey(string.Format("fk_{0}_{1}",
         NamingHelper.GetPrefixedName(instance.EntityType),
         Inflector.Underscore(instance.ChildType.Name).ToLower()));
 }
开发者ID:brendanhay,项目名称:Shared,代码行数:11,代码来源:HasManyConvention.cs


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