Table of Contents

Class RepositoryOperationException

Namespace
Core.CliniCore.Repositories
Assembly
Core.CliniCore.dll

Exception thrown when a repository operation (Add, Update, Delete) fails. Provides context about which operation failed and on what entity.

public class RepositoryOperationException : Exception, ISerializable
Inheritance
RepositoryOperationException
Implements
Inherited Members

Constructors

RepositoryOperationException(string, string, Guid?, string)

public RepositoryOperationException(string operation, string entityType, Guid? entityId, string message)

Parameters

operation string
entityType string
entityId Guid?
message string

RepositoryOperationException(string, string, Guid?, string, Exception)

public RepositoryOperationException(string operation, string entityType, Guid? entityId, string message, Exception innerException)

Parameters

operation string
entityType string
entityId Guid?
message string
innerException Exception

Properties

EntityId

The ID of the entity, if available

public Guid? EntityId { get; }

Property Value

Guid?

EntityType

The type of entity involved (e.g., "Patient", "ClinicalDocument")

public string EntityType { get; }

Property Value

string

Operation

The operation that failed (e.g., "Add", "Update", "Delete")

public string Operation { get; }

Property Value

string

Methods

ToString()

Creates and returns a string representation of the current exception.

public override string ToString()

Returns

string

A string representation of the current exception.