RestierHelpers

Provides utility methods for logging Restier operations and entity lifecycle events. Supports logging for both named entities and identifiable entities with detailed operation tracking.

Syntax

public static class RestierHelpers

Inheritance

Methods

LogOperation

public static void LogOperation(DbObservableObject entity, RestierOperationType operation)
Logs a Restier operation for the specified DbObservableObject entity. Extracts the entity type name and delegates to the string-based logging method.

Parameters

LogOperation

public static void LogOperation(string entityName, RestierOperationType operation)
Logs a Restier operation for the specified entity type name. Formats the log message with appropriate verb tense based on operation type.

Parameters

  • entityName string: The name of the entity type being operated on.
  • operation RestierOperationType: The type of operation being performed.

LogOperation<T, TId>

public static void LogOperation<T, TId>(T entity, RestierOperationType operation) where T : IIdentifiable<TId> where TId : struct
Logs a Restier operation for the specified identifiable entity, including the entity’s ID in the log message. Provides more detailed logging by including the specific entity identifier.

Parameters

  • entity T: The identifiable entity being operated on.
  • operation RestierOperationType: The type of operation being performed.