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


C# IOneToManyCollectionInstance.Inverse方法代码示例

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


在下文中一共展示了IOneToManyCollectionInstance.Inverse方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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)
        {
            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

示例5: 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

示例6: Apply

        /// <summary>
        /// Applies this has many convention to the specified <see cref = "IOneToManyCollectionInstance" />.
        /// </summary>
        /// <param name="instance">An <see cref = "IOneToManyCollectionInstance" />.</param>
        public void Apply(IOneToManyCollectionInstance instance)
        {
            if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }

            instance.Key.Column(instance.EntityType.Name + "Id");
            instance.Cascade.AllDeleteOrphan();
            instance.Inverse();
        }
开发者ID:MatthewRudolph,项目名称:Airy,代码行数:15,代码来源:HasManyConvention.cs

示例7: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Access.ReadOnlyPropertyThroughCamelCaseField(CamelCasePrefix.Underscore);
     instance.Cascade.AllDeleteOrphan();            
     if (instance.OtherSide == null)
         instance.Not.Inverse();
     else
         instance.Inverse();
     instance.BatchSize(500);
     instance.AsSet();
     instance.Not.KeyNullable();
     instance.LazyLoad();
 }
开发者ID:neteagles,项目名称:Komrad.Template,代码行数:13,代码来源:PluralRelationsConvention.cs

示例8: Apply

        /// <summary>
        /// Applies Key based on type.
        /// </summary>
        /// <param name="instance">The instance.</param>
        public void Apply(IOneToManyCollectionInstance instance)
        {
            var entityType = instance.EntityType;

            // name the key field
            var key = entityType.Name;

            if (typeof(ILookup).IsAssignableFrom(entityType))
            {
                key = key + "Lkp";
            }

            instance.Key.Column(key + "Key");
            instance.Inverse();
        }
开发者ID:divyang4481,项目名称:REM,代码行数:19,代码来源:ForeignKeyColumnNameConvention.cs

示例9: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Access.ReadOnlyPropertyThroughCamelCaseField();
     instance.Cascade.AllDeleteOrphan();
     instance.AsSet();
     instance.BatchSize(25);
     if (instance.OtherSide == null)
     {
         instance.Not.Inverse();
     }
     else
     {
         instance.Inverse();
     }
     instance.Not.KeyNullable();
 }
开发者ID:Eskat0n,项目名称:Frameplate,代码行数:16,代码来源:HasManyConvention.cs

示例10: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.Inverse();
     instance.Cascade.AllDeleteOrphan();
 }
开发者ID:MichaelBuen,项目名称:Demo_NHibernate_Plus_Redis,代码行数:5,代码来源:NHMapping.cs

示例11: SetInverseAndAsSetIfNotAList

 private void SetInverseAndAsSetIfNotAList(Type collectionType, IOneToManyCollectionInstance instance)
 {
     if (collectionType.IsSubclassOfRawGeneric(typeof (IList<>))) return;
     instance.Inverse(); // inverse by default if not an ordered list
     instance.AsSet();
 }
开发者ID:xhafan,项目名称:emailmaker,代码行数:6,代码来源:HasManyForDomainConvention.cs

示例12: Apply

 public void Apply(IOneToManyCollectionInstance target)
 {
     target.Cascade.AllDeleteOrphan();
     target.Inverse();
 }
开发者ID:JamesKovacs,项目名称:prairiedevcon2010-jquerydojo,代码行数:5,代码来源:HasManyConvention.cs

示例13: Apply

 public void Apply(IOneToManyCollectionInstance instance)
 {
     instance.LazyLoad();
     instance.AsBag();
     instance.Cascade.SaveUpdate();
     instance.Inverse();
 }
开发者ID:mdcruz,项目名称:NorthwindAutomation,代码行数:7,代码来源:SessionFactory.cs


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