(ProcedureContext ctx, uint a, string b)
| 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] |