Delete Entity

Syntax

Delete(entity);

Arguments

entity

T

Instance of the to-be-deleted record.

This parameter must not be empty.

Description

Deletes an existing record of a repository by taking an instance of the record as input.

Before calling the function, you need to load the record you wish to delete into a variable, e.g. by using "GetByID" or "Find", to be able to insert it as input.

Example

The following program illustrates the function call:

var deletedOrder = repo.GetByID("EU00789980");
repo.Delete(deletedOrder);

The function will delete the specific record in the repository that has the Primary Key value "EU00789980".

Last updated