.InsertRelation<T>()
Inserts one or multiple relations in the database.
Method Syntaxawait db.InsertRelation<T>(table, data)
Arguments | Description | ||
---|---|---|---|
table optional | Optionally pass along a table to insert into. | ||
data optional | Either a single document/record or an array of documents/records to insert | ||
cancellationToken optional | The cancellationToken enables graceful cancellation of asynchronous operations. |
await db.InsertRelation( new WroteRelation { In = ("user", "u1"), Out = ("post", "p1"), CreatedAt = now, NumberOfPages = 144 } );