src/Misc/EFTools/EntityDesignModel/ModelHelper.cs
/// <summary>
///     Searches for set of properties defined by provided names.
/// </summary>
/// <param name="entity">Entity to find properties of</param>
/// <param name="propertyNames">Set of names of properties to search for</param>
/// <returns>Set of found properties or null if at least one property was not found</returns>
Searches for set of properties defined by provided names.
Searches for set of properties defined by provided names .
internal static IEnumerable<Property> FindProperties(EntityType entity, IEnumerable<string> propertyNames)
        {
            var list = new List<Property>();
            foreach (var name in propertyNames)
            {
                var property = FindProperty(entity, name);
                if (property != null)
                {
                    list.Add(property);
                }
                else
                {
                    Debug.Fail("Could not find property named " + name + " in Entity " + entity);
                    return null;
                }
            }
            return list;
        }
internal static IEnumerable < Property > FindProperties ( EntityType entity , IEnumerable < string > propertyNames ) { var list = new List < Property > ( ) ; foreach ( var name in propertyNames ) { var property = FindProperty ( entity , name ) ; if ( property != null ) { list . Add ( property ) ; } else { Debug . Fail ( " " + name + " " + entity ) ; return null ; } } return list ; }
Searches for set of properties defined by provided names.
Searches for set of properties defined by provided names .
Set of found properties or null if at least one property was not found
Set of found properties or null if at least one property was not found
entity
EntityType
Entity to find properties of
Entity to find properties of
propertyNames
IEnumerable<string>
Set of names of properties to search for
Set of names of properties to search for