Class MemberInfoExtensions
Helpers for resolving a member's column name and for looking up its metadata in the shared entity metadata cache.
public static class MemberInfoExtensions
- Inheritance
-
MemberInfoExtensions
- Inherited Members
Methods
GetPropertyColumnName(MemberInfo, INamingConvention?)
Column name registered for the member in the shared entity metadata cache, or an empty string
when the metadata does not declare it. Auto-derived names are translated through
convention; declared names are returned verbatim.
public static string GetPropertyColumnName(this MemberInfo mi, INamingConvention? convention = null)
Parameters
miMemberInfoThe CLR member to resolve.
conventionINamingConventionThe naming convention applied to auto-derived names, or null.
Returns
TryGetValue(IDictionary<Type, IEntityMetadata>, Type, PropertyInfo, out IPropertyMetadata?)
Looks up the metadata for pi in the entity metadata registered for
type. Because the metadata is keyed by type, the property is matched by
scanning that entity's properties rather than by a direct dictionary lookup.
public static bool TryGetValue(this IDictionary<Type, IEntityMetadata> dic, Type type, PropertyInfo pi, out IPropertyMetadata? prop)
Parameters
dicIDictionary<Type, IEntityMetadata>Entity metadata cache keyed by entity type.
typeTypeThe entity type whose metadata should be searched.
piPropertyInfoThe property to find in the entity's metadata.
propIPropertyMetadataWhen this method returns true, the matching property metadata; otherwise null.