本文整理汇总了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();
}
示例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();
}
示例3: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
instance.Key.Column(instance.EntityType.Name + "Id");
instance.Inverse();
instance.Access.CamelCaseField();
instance.Cascade.AllDeleteOrphan();
}
示例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();
}
示例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)");
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例10: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
instance.Inverse();
instance.Cascade.AllDeleteOrphan();
}
示例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();
}
示例12: Apply
public void Apply(IOneToManyCollectionInstance target)
{
target.Cascade.AllDeleteOrphan();
target.Inverse();
}
示例13: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
instance.LazyLoad();
instance.AsBag();
instance.Cascade.SaveUpdate();
instance.Inverse();
}