src/Misc/EFTools/EntityDesign/UI/ViewModels/MappingDetails/MappingEFElement.cs
// <summary>
//     Looks for an LOV Element in this item's list of values.
// </summary>
// <param name="lovDisplayName">What to look for</param>
// <param name="lovType">Which LOV collection to search</param>
// <returns>If none are found it will return a null item.</returns>
Looks for an LOV Element in this item's list of values.
Looks for an LOV Element in this item ' s list of values .
internal MappingLovEFElement FindMappingLovElement(string lovDisplayName, ListOfValuesCollection lovType)
        {
            MappingLovEFElement mappingLovElement = null;
            Debug.Assert(lovDisplayName != null, "Null lovDisplayName in FindMappingLovElement()");
            if (lovDisplayName != null)
            {
                var lov = GetListOfValues(lovType);
                foreach (var entry in lov)
                {
                    if (lovDisplayName == entry.Value)
                    {
                        mappingLovElement = entry.Key;
                        break;
                    }
                }
                Debug.Assert(
                    mappingLovElement != null,
                    "Could not find MappingLovElement for lovDisplayName " + lovDisplayName + ", lovType " + lovType.ToString());
            }
            return mappingLovElement;
        }
internal MappingLovEFElement FindMappingLovElement ( string lovDisplayName , ListOfValuesCollection lovType ) { MappingLovEFElement mappingLovElement = null ; Debug . Assert ( lovDisplayName != null , " " ) ; if ( lovDisplayName != null ) { var lov = GetListOfValues ( lovType ) ; foreach ( var entry in lov ) { if ( lovDisplayName == entry . Value ) { mappingLovElement = entry . Key ; break ; } } Debug . Assert ( mappingLovElement != null , " " + lovDisplayName + " " + lovType . ToString ( ) ) ; } return mappingLovElement ; }
Looks for an LOV Element in this item's list of values.
Looks for an LOV Element in this item ' s list of values .
If none are found it will return a null item.
If none are found it will return a null item .
lovDisplayName
string
None
lovType
ListOfValuesCollection
Which LOV collection to search
Which LOV collection to search