.InsertRelation<T>()

Inserts one or multiple relations in the database.

Method Syntax

await db.InsertRelation<T>(table, data)
ArgumentsDescription
table Optionally pass along a table to insert into.
data Either a single document/record or an array of documents/records to insert
cancellationToken The cancellationToken enables graceful cancellation of asynchronous operations.
await db.InsertRelation(
new WroteRelation
{
In = ("user", "u1"),
Out = ("post", "p1"),
CreatedAt = now,
NumberOfPages = 144
}
);

Was this page helpful?