EntityPropertyTranslationHelper Class
Namespace: PTS
Assembly: PTS.Modules.EntityTranslationComponent.dll
Provides static methods for IPropertyTranslation types.
Syntax
public static class EntityPropertyTranslationHelper
Inheritance
System.Object
EntityPropertyTranslationHelper
Methods
ToEntityTranslation<TEntity>(TEntity, IEnumerable<IPropertyTranslation>, LanguageCode)
Returns a new instance of PropertyTranslationCollection with translations from specified collection.
Declaration
public static EntityTranslation<TEntity> ToEntityTranslation<TEntity>(this TEntity entity, IEnumerable<IPropertyTranslation> translations, LanguageCode defaultLanguage = LanguageCode.NotSet)
where TEntity : class, IIdRecord
Parameters
Type | Name | Description |
---|---|---|
TEntity | entity | Entity to get the properties for. |
System.Collections.Generic.IEnumerable<IPropertyTranslation> | translations | Translations to be added to the collection. |
LanguageCode | defaultLanguage | Default language that will be used to retrieve and set property translations. |
Returns
Type | Description |
---|---|
EntityTranslation<TEntity> | A new instance of PropertyTranslationCollection bound to specified enity type. |
Type Parameters
Name | Description |
---|---|
TEntity | Type of entity to get translated properties for. |
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()