Exemplo n.º 1
0
        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());
        }
Exemplo n.º 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));
        }