MongoDB · Types · Finding the rows

ArxDeleteOptions

Definition

Namespace
ARX.SDK.Services
Package
ARX.SDK
C#
public sealed class ArxDeleteOptions

Options for Delete and DeleteMultiple.

Properties

  • ArxMatch Match { get; init; }

    How the rows are found; Id by default.

  • bool RequireSingleRow { get; init; }

    When true, every entity must delete exactly one row: none is ARX2002 RecordNotFound, more than one is ARX2003 MultipleRecordsMatched, and either way nothing is deleted. Off by default: a delete that finds nothing is a normal outcome, and a delete by custom columns may remove many rows.

Usage

C#

A line from a verified sample; the full, runnable code is on its page.

int deleted = await service.DeleteAsync(match, new ArxDeleteOptions { Match = ArxMatch.Key("region", "sku") });

Choose how the documents are found, scenario 1

Used in: