delete method
Deletes an entity.
Returns the deleted entity.
Throws a RepositoryException if an error occurs.
An optional options parameter can be provided to customize the delete behavior.
Implementation
@override
Future<E> delete(
E entity, {
DeleteOptions? options,
TransactionContext? transaction,
}) async {
if (transaction != null) {
throw TransactionException(
'Transaction is not supported in StorageRepository',
);
}
await deleteById(entity.id);
return entity;
}