Files
Piotr Sarnacki cd1ec90d16 Templates naming standarization (#4042)
# Description of Changes

This PR renames the templates to always use shorthand for the language,
specify a framework (or console) if necessary, and shorten the naming in
general

# Expected complexity level and risk

1

# Testing

I've tested generating templates manually

---------

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-01-23 16:08:23 +00:00

27 lines
592 B
C#

using SpacetimeDB;
public static partial class Module
{
[SpacetimeDB.Table(Name = "Person", Public = true)]
public partial struct Person
{
public string Name;
}
[SpacetimeDB.Reducer]
public static void Add(ReducerContext ctx, string name)
{
ctx.Db.Person.Insert(new Person { Name = name });
}
[SpacetimeDB.Reducer]
public static void SayHello(ReducerContext ctx)
{
foreach (var person in ctx.Db.Person.Iter())
{
Log.Info($"Hello, {person.Name}!");
}
Log.Info("Hello, World!");
}
}