Table of Contents

Class MemberInfoExtensions

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

mi MemberInfo

The CLR member to resolve.

convention INamingConvention

The naming convention applied to auto-derived names, or null.

Returns

string

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

dic IDictionary<Type, IEntityMetadata>

Entity metadata cache keyed by entity type.

type Type

The entity type whose metadata should be searched.

pi PropertyInfo

The property to find in the entity's metadata.

prop IPropertyMetadata

When this method returns true, the matching property metadata; otherwise null.

Returns

bool

true when the type and property are both found; otherwise false.