How do I define a method in Razor?
You mean inline helper?
@helper SayHello(string name) { Hello @name } @SayHello("John")