DataTranslationTable class
namespace: Serenity.Data assembly: Serenity.Net.Services
The names of the shared table that keeps the translations of the rows with a SharedLocalizationAttribute, one row per record, field and language, in the database of those rows.
public static class DataTranslationTable
Public Members
| name | description |
|---|---|
| const EntityIdGuid | The ID of a record with a GUID ID. |
| const EntityIdInt | The ID of a record with an integer ID. |
| const EntityIdString | The ID of a record with a string ID. |
| const EntityIdStringSize | The size of EntityIdString. |
| const EntityType | The type of the record, the row identifier of its row, e.g. "Northwind.Region". |
| const EntityTypeSize | The size of EntityType. |
| const FieldName | The property name of the translated field. |
| const FieldNameSize | The size of FieldName. |
| const LanguageId | The language of the translation, e.g. "de" or "de-DE". |
| const LanguageIdSize | The size of LanguageId. |
| static readonly NoGuidId | The value of EntityIdGuid for a record whose ID is not a GUID. |
| const NoIntId | The value of EntityIdInt for a record whose ID is not an integer. It is not reserved: a record with the ID zero is kept with it too, as the entity type tells the two apart. |
| const NoStringId | The value of EntityIdString for a record whose ID is not a string. It is not empty, as Oracle stores an empty string as null. |
| const TableName | The name of the table. |
| const TranslationId | The identity column. |
| const UpdateDate | The UTC time the translation was last changed. |
| const UpdateUserId | The ID of the user who last changed the translation. |
| const UpdateUsername | The username of the user who last changed the translation. |
| const UpdateUsernameSize | The size of UpdateUsername. |
| const Value | The translation. |
| static IdColumn(…) | Gets the name of the column that keeps the IDs of a kind. |
| static Quoted(…) | Gets the name of a column, in brackets, so that the dialect quotes it, e.g. for a database that is case sensitive. |
Remarks
The ID of a record is in the column of its kind (EntityIdInt, EntityIdGuid or EntityIdString), and the other two have the placeholders NoIntId, NoGuidId and NoStringId, so that none of them is null and the unique index over them works the same way on every database. An entity type always has one kind of ID, so a placeholder never meets a real ID of the same entity type.
See Also
- Source: DataTranslationTable.cs