本文整理汇总了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();
}
示例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)
{
if (instance.TableName != null)
{
instance.Table(AlterTableName(instance.TableName));
}
}
示例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}");
}
示例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));
}
示例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());
}
示例8: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
instance.Key.Column(instance.EntityType.Name + "Fk");
instance.BatchSize(5);
instance.Cascade.All();
}
示例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()));
}
示例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));
}
示例11: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
if (instance.TableName.IsNotNull())
{
instance.Table(
string.Format("`{0}_{1}`", Prefix, instance.TableName.Replace("`", ""))
);
}
}
示例12: Apply
public void Apply(IOneToManyCollectionInstance instance)
{
var tableName = GetTableName(instance);
instance.AsSet();
instance.Table(tableName);
instance.CollectionType<PersistentMultiCultureStringType>();
instance.Cascade.AllDeleteOrphan();
}
示例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();
}
示例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)");
}
示例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()));
}