MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / InsertAValue

Method InsertAValue

docs/test-csharp-snippets/Module.cs:22–30  ·  view source on GitHub ↗
(ProcedureContext ctx, uint a, string b)

Source from the content-addressed store, hash-verified

20 }
21
22 [SpacetimeDB.Procedure]
23 public static void InsertAValue(ProcedureContext ctx, uint a, string b)
24 {
25 ctx.WithTx(txCtx =>
26 {
27 txCtx.Db.MyTable.Insert(new MyTable { A = a, B = b });
28 return 0;
29 });
30 }
31
32 // === Snippet 3: Fallible database operations ===
33 [SpacetimeDB.Procedure]

Callers

nothing calls this directly

Calls 2

WithTxMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected