/// <summary> /// This method will add an InferReferentialConstraints 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); }
/// <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); }