IWriter<T, in K>

Interface for data processing components that can create, update and delete data items.

Description

The IWriter interface is used by data processng components that can create, update and delete data items.

Instance methods

CreateAsync

Creates a data item.

Task<T> CreateAsync(IContext context, T item)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • item: T - item to be created.
  • returns: Task<T> - created item

UpdateAsync

Updates a data item.

Task<T> UpdateAsync(IContext context, T item)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • item: T - item to be updated.
  • returns: Task<T> - updated item

DeleteByIdAsync

Updates a data item.

Task<T> DeleteByIdAsync(IContext context, K id)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • id: K - id of the item to be deleted
  • returns: Task<T> - deleted item.