internal static ModificationFunction GetModificationFunction( EntityType conceptualEntityType, Function function, ModificationFunctionType type) { if (null == function || null == conceptualEntityType) { Debug.Assert(null != function, typeof(ModificationFunction).Name + ".GetModificationFunction() requires non-null function"); Debug.Assert( null != conceptualEntityType, typeof(ModificationFunction).Name + ".GetModificationFunction() requires non-null conceptualEntityType"); return null; } foreach (var mf in function.GetAntiDependenciesOfType<ModificationFunction>()) { if (mf.ModificationFunctionMapping.EntityTypeMapping.FirstBoundConceptualEntityType == conceptualEntityType && mf.FunctionType == type) { return mf; } } return null; }