本文整理汇总了C#中Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext.AddIntegrityCheck方法的典型用法代码示例。如果您正苦于以下问题:C# CommandProcessorContext.AddIntegrityCheck方法的具体用法?C# CommandProcessorContext.AddIntegrityCheck怎么用?C# CommandProcessorContext.AddIntegrityCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.Data.Entity.Design.Model.Commands.CommandProcessorContext
的用法示例。
在下文中一共展示了CommandProcessorContext.AddIntegrityCheck方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddRule
internal static void AddRule(CommandProcessorContext cpc, ConceptualEntityType element)
{
if (element != null)
{
IIntegrityCheck check = new PropagateViewKeysToStorageModel(cpc, element);
cpc.AddIntegrityCheck(check);
}
}
示例2: ScheduleBindingsForRebind
/// <summary>
/// Schedule the given set of bindings for rebinding when the transaction completes
/// </summary>
/// <param name="cpc"></param>
/// <param name="bindingsToRebind"></param>
internal static void ScheduleBindingsForRebind(CommandProcessorContext cpc, ICollection<ItemBinding> bindingsToRebind)
{
Debug.Assert(cpc != null);
Debug.Assert(bindingsToRebind != null);
if (bindingsToRebind.Count > 0)
{
var check = new CheckArtifactBindings(cpc);
cpc.AddIntegrityCheck(check);
foreach (var ib in bindingsToRebind)
{
cpc.AddBindingForRebind(ib);
}
}
}
示例3: AddRule
internal static void AddRule(CommandProcessorContext cpc, EntitySetMapping element)
{
if (element != null)
{
IIntegrityCheck check = new EnforceEntitySetMappingRules(cpc, element);
cpc.AddIntegrityCheck(check);
}
}
示例4: AddRule
/// <summary>
/// This method will add an InferReferentialContraints IntegrityCheck for the passed in
/// association.
/// </summary>
/// <param name="cpc"></param>
/// <param name="association">This is only valid for C-Side associations.</param>
internal static void AddRule(CommandProcessorContext cpc, Association association)
{
Debug.Assert(association != null, "association should not be null");
Debug.Assert(association.EntityModel.IsCSDL, "association should be from C-side");
Debug.Assert(
association.AssociationEnds().Count == 2,
"association.AssociationEnds().Count(" + association.AssociationEnds().Count + ") should be 2");
Debug.Assert(association.AssociationSet != null, "association.AssociationSet should not be null");
IIntegrityCheck check = new InferReferentialConstraints(cpc, association);
cpc.AddIntegrityCheck(check);
}
示例5: AddRule
// add one PropagateConceptualSGPToStorageProperty for each StorageProperty mapped to this ConceptualProperty
internal static void AddRule(CommandProcessorContext cpc, ConceptualProperty cProp, bool propagateNoneSGP)
{
if (null != cProp)
{
foreach (var sProp in MappedStorageProperties(cProp))
{
IIntegrityCheck check = new PropagateStoreGeneratedPatternToStorageModel(cpc, sProp, propagateNoneSGP);
cpc.AddIntegrityCheck(check);
}
}
}
示例6: AddRule
internal static void AddRule(CommandProcessorContext cpc, AssociationSetMapping associationSetMapping)
{
Debug.Assert(associationSetMapping != null, "associationSetMapping should not be null");
IIntegrityCheck check = new EnforceAssociationSetMappingRules(cpc, associationSetMapping);
cpc.AddIntegrityCheck(check);
}