# Class SyncEntity OptimaJet.Workflow.Core.Entities.SyncEntity Represents persisted synchronization state used to coordinate timer scheduling among [WorkflowRuntime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/WorkflowRuntime/) instances. Namespace: [OptimaJet.Workflow.Core.Entities](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/) ```csharp public class SyncEntity : IEntity ``` ## Type Hierarchy - SyncEntity Current type - Implemented interfaces - [IEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/IEntity/) ## Properties `public string Name { get; set; }` Gets or sets the name that identifies the synchronization record. `public Guid Lock { get; set; }` Gets or sets the optimistic-concurrency token for the synchronization record. ## Methods `public object GetValue(string key)` Gets the value of the property identified by `key`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `key` | `String` | The case-sensitive name of [SyncEntity.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) or [SyncEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/). | ### Returns | Type | Description | | --- | --- | | `Object` | The value of the property selected by `key`. | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not match the name of a supported property. | `public void SetValue(string key, object value)` Sets the value of the property identified by `key`. ### Parameters | Name | Type | Description | | --- | --- | --- | | `key` | `String` | The case-sensitive name of [SyncEntity.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) or [SyncEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/). | | `value` | `Object` | The value to assign. A value for [SyncEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) must be a [Guid](https://learn.microsoft.com/dotnet/api/system.guid); a value that is not a [string](https://learn.microsoft.com/dotnet/api/system.string) for [SyncEntity.Name](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) is assigned as [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | ### Exceptions | Type | Description | | --- | --- | | `ColumnNotExistsException` | `key` does not match the name of a supported property. | | `InvalidCastException` | `key` identifies [SyncEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) and `value` is not [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) and is not a [Guid](https://learn.microsoft.com/dotnet/api/system.guid). | | `NullReferenceException` | `key` identifies [SyncEntity.Lock](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SyncEntity/) and `value` is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null). | [Previous SchemeEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/SchemeEntity/) [Next WorkflowFormEntity](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Entities/WorkflowFormEntity/)