IEntityTranslationService<TBaseEntity, TTranslation> Interface
Assembly: PTS.Modules.EntityTranslationComponent.dll
Syntax
public interface IEntityTranslationService<TBaseEntity, TTranslation>
where TBaseEntity : class, IIdRecord where TTranslation : class, IEntityPropertyTranslation<TBaseEntity>, new()
Type Parameters
Name |
Description |
TBaseEntity
|
|
TTranslation
|
|
Methods
Entity<TEntity>(LanguageCode, TEntity)
Declaration
EntityTranslation<TEntity> Entity<TEntity>(LanguageCode language, TEntity entity)
where TEntity : class, TBaseEntity
Parameters
Returns
Type Parameters
EntityAsync<TEntity>(LanguageCode, TEntity)
Declaration
Task<EntityTranslation<TEntity>> EntityAsync<TEntity>(LanguageCode language, TEntity entity)
where TEntity : class, TBaseEntity
Parameters
Returns
Type Parameters
GetTranslation<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
TTranslation GetTranslation<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : class, TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
TTranslation |
|
Type Parameters
GetTranslationAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
Task<TTranslation> GetTranslationAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : class, TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<TTranslation> |
|
Type Parameters
Property<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
string Property<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
PropertyAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>)
Declaration
Task<string> PropertyAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property)
where TEntity : TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
Type Parameters
SetEntity<TEntity>(TEntity, EntityTranslation<TEntity>)
Declaration
void SetEntity<TEntity>(TEntity entity, EntityTranslation<TEntity> translatedEntity)
where TEntity : class, TBaseEntity
Parameters
Type Parameters
SetEntityAsync<TEntity>(TEntity, EntityTranslation<TEntity>)
Declaration
Task SetEntityAsync<TEntity>(TEntity entity, EntityTranslation<TEntity> translatedEntity)
where TEntity : class, TBaseEntity
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Type Parameters
SetProperty<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>, String)
Declaration
IEntityPropertyTranslation<TBaseEntity> SetProperty<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property, string value)
where TEntity : class, TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
System.String |
value |
|
Returns
Type Parameters
SetPropertyAsync<TEntity>(LanguageCode, TEntity, Expression<Func<TEntity, String>>, String)
Declaration
Task<TTranslation> SetPropertyAsync<TEntity>(LanguageCode language, TEntity entity, Expression<Func<TEntity, string>> property, string value)
where TEntity : class, TBaseEntity
Parameters
Type |
Name |
Description |
LanguageCode |
language |
|
TEntity |
entity |
|
System.Linq.Expressions.Expression<System.Func<TEntity, System.String>> |
property |
|
System.String |
value |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<TTranslation> |
|
Type Parameters
Extension Methods