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

IChoiceService

public interface IChoiceService
Represents the choice API service.
Choice Create(int workspaceId, Choice entity)

Creates the specified choice.

void Delete(int workspaceId, int entityId)

Deletes the choice by ID.

Choice Get(int workspaceId, int entityId)

Gets the choice by the specified ID.

IEnumerable<Choice> GetAll(int workspaceId, string objectTypeName, string fieldName)

Gets all choices for particular object field.

Choice Require(int workspaceId, Choice entity)

Requires the specified choice. 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 [Name](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.NamedArtifact.html#Relativity_Testing_Framework_Models_NamedArtifact_Name) and ObjectType(https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Choice.html#Relativity_Testing_Framework_Models_Choice_ObjectType) and [Field](https://relativitydev.github.io/relativity.testing.framework/api/Relativity.Testing.Framework.Models.Choice.html#Relativity_Testing_Framework_Models_Choice_Field) name properties of entity have a value, gets entity by name and updates it if it exists.Otherwise creates a new entity using ICreateWorkspaceEntityStrategy<T>.

void Update(int workspaceId, Choice entity)

Updates the specified choice.