本文整理汇总了C#中IClassDef.IsUsingClassTableInheritance方法的典型用法代码示例。如果您正苦于以下问题:C# IClassDef.IsUsingClassTableInheritance方法的具体用法?C# IClassDef.IsUsingClassTableInheritance怎么用?C# IClassDef.IsUsingClassTableInheritance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClassDef
的用法示例。
在下文中一共展示了IClassDef.IsUsingClassTableInheritance方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareField
///<summary>
/// Prepares
///</summary>
///<param name="currentSource"></param>
///<param name="classDef"></param>
///<param name="field"></param>
///<returns></returns>
public static IPropDef PrepareField(Source currentSource, IClassDef classDef, QueryField field)
{
IClassDef classDefOfField = classDef;
if (classDef.IsUsingClassTableInheritance())
classDefOfField = classDef.GetPropDef(field.PropertyName).ClassDef;
IClassDef fieldClassDef;
PrepareSource(classDefOfField, ref currentSource, out fieldClassDef);
field.Source = currentSource;
if (fieldClassDef != null)
return fieldClassDef.GetPropDef(field.PropertyName);
return null;
}
示例2: GetPropsToInclude
/// <summary>
/// Builds a collection of properties to include in the insertion,
/// depending on the inheritance type.
/// </summary>
protected override IBOPropCol GetPropsToInclude(IClassDef currentClassDef)
{
var propsToInclude = base.GetPropsToInclude(currentClassDef);
if (currentClassDef.IsUsingClassTableInheritance())
{
AddParentID(propsToInclude);
}
return propsToInclude;
}
示例3: CreateOrderCriteria
///<summary>
/// Based on the class definition and the orderByString an <see cref="OrderCriteria"/> object is created.
/// The orderCriteria object is a set of order by fields including information on their
/// business object properties and their dataSource.
///</summary>
///<param name="classDef">The class definition to use for building the order criteria</param>
///<param name="orderByString">The orderby string to use for creating the <see cref="OrderCriteria"/>.</param>
///<returns>the newly created <see cref="OrderCriteria"/> object.</returns>
public static IOrderCriteria CreateOrderCriteria(IClassDef classDef, string orderByString)
{
if (classDef == null) throw new ArgumentNullException("classDef");
IOrderCriteria orderCriteria = OrderCriteria.FromString(orderByString);
try
{
//TODO Mark 20 Mar 2009: Souldn't the following code be stripped out into a PrepareOrderBy method that is called before loading? (Similar to PrepareCriteria)
foreach (OrderCriteriaField field in orderCriteria.Fields)
{
Source source = field.Source;
IClassDef relatedClassDef;
IClassDef classDefOfField = classDef;
if (classDef.IsUsingClassTableInheritance())
classDefOfField = classDef.GetPropDef(field.PropertyName).ClassDef;
PrepareSource(classDefOfField, ref source, out relatedClassDef);
field.Source = source;
IPropDef propDef = relatedClassDef.GetPropDef(field.PropertyName);
field.FieldName = propDef.DatabaseFieldName;
field.Source.ChildSourceLeaf.EntityName = relatedClassDef.GetTableName(propDef);
}
return orderCriteria;
}
catch (InvalidPropertyNameException)
{
throw new InvalidOrderCriteriaException("The orderByString '" + orderByString
+ "' is not valid for the classDef '" + classDef.ClassNameFull);
}
}