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());
        }
示例#2
0
        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));
        }