@@ -59,22 +59,22 @@ Then just run project via F5 (it will download all required nuget and npm packag
5959
6060## [ Detailed documentation] ( https://github.com/SimplifyNet/Simplify.Web/wiki )
6161
62- ### API outgoing JSON controller example
62+ ### API outgoing JSON controller v2 example
6363
6464``` csharp
6565[Get (" api/v1/weatherTypes" )]
66- public class SampleDataController : Controller
66+ public class SampleDataController : Controller2
6767{
6868 private static readonly string [] Summaries =
6969 {
7070 " Freezing" , " Bracing" , " Chilly" , " Cool" , " Mild" , " Warm" , " Balmy" , " Hot" , " Sweltering" , " Scorching"
7171 };
7272
73- public override ControllerResponse Invoke ()
73+ public ControllerResponse Invoke ()
7474 {
7575 try
7676 {
77- return new Json (items );
77+ return Json (items );
7878 }
7979 catch (Exception e )
8080 {
@@ -86,13 +86,13 @@ public class SampleDataController : Controller
8686}
8787```
8888
89- ### API ingoing JSON controller example
89+ ### API ingoing JSON controller v2 example
9090
9191``` csharp
9292[Post (" api/v1/sendMessage" )]
93- public class SampleDataController : Controller <SampleModel >
93+ public class SampleDataController : Controller2 <SampleModel >
9494{
95- public override ControllerResponse Invoke ()
95+ public ControllerResponse Invoke ()
9696 {
9797 try
9898 {
@@ -122,7 +122,7 @@ public class SampleModel
122122
123123### Some simple HTML generation controllers example
124124
125- #### Static page controller
125+ #### Static page controller v1 example
126126
127127``` csharp
128128// Controller will be executed only on HTTP GET request like http://mysite.com/about
@@ -132,12 +132,12 @@ public class AboutController : Controller
132132 public override ControllerResponse Invoke ()
133133 {
134134 // About.tpl content will be inserted into {MainContent} in Master.tpl
135- return new StaticTpl (" Static/About" , StringTable .PageTitleAbout );
135+ return StaticTpl (" Static/About" , StringTable .PageTitleAbout );
136136 }
137137}
138138```
139139
140- #### Any page controller with high run priority example
140+ #### Any page controller v1 with high run priority example
141141
142142Runs on any request and adds login panel to a pages
143143
0 commit comments