public static string GetFinalTypeName(Sungero.Domain.Shared.IEntity entity) { var entityFinalType = entity.GetType().GetFinalType(); var entityTypeMetadata = Sungero.Metadata.Services.MetadataSearcher.FindEntityMetadata(entityFinalType); return(entityTypeMetadata.GetDisplayName()); }
public static string GetTypeDisplayValue(Sungero.Domain.Shared.IEntity entity, CommonLibrary.DeclensionCase declension = CommonLibrary.DeclensionCase.Nominative) { if (entity == null) { return(string.Empty); } var entityFinalType = entity.GetType().GetFinalType(); var entityTypeMetadata = Sungero.Metadata.Services.MetadataSearcher.FindEntityMetadata(entityFinalType); var displayName = entityTypeMetadata.GetDisplayName(); return(CommonLibrary.Padeg.ConvertCurrencyNameToTargetDeclension(displayName, declension)); }