<PackageReference Include="Relativity.Server.Testing.Framework.Api.SDK" Version="5000.1.0" />

IEntityService

public interface IEntityService
Represents the entity API service.
Entity Create(int workspaceId, Entity entity)

Creates the specified production.

void Delete(int workspaceId, int entityId)

Deletes the entity by the specified artifact ID.

bool Exists(int workspaceId, int entityId)

Determines whether the entity with the specified case artifact ID exists.

Entity Get(int workspaceId, int entityId)

Gets the entity by the specified ID.

Entity[] GetAll(int workspaceId)

Gets all entities.

Entity Require(int workspaceId, Entity entity)

Requires the specified entity. If [ArtifactID](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Artifact.html#Relativity_Testing_Framework_Models_Artifact_ArtifactID) property of entity has positive value, gets entity by ID and updates it.If [FullName](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Entity.html#Relativity_Testing_Framework_Models_Entity_FullName) full name property of entity have a value, gets entity by full name and updates it if it exists.Otherwise creates a new entity using ICreateWorkspaceEntityStrategy<T>.

void Update(int workspaceId, Entity entity)

Updates the specified entity.