Skip to content

Commit

Permalink
[edit] to controller v2 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
i4004 committed Jun 1, 2024
1 parent df2cd94 commit 771d9af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
If the controller returns `Json` response class object, then the Framework execution will be stopped, object will be parsed to JSON string and sent to client

```csharp
public class MyController : Controller
public class MyController : Controller2
{
public override ControllerResponse Invoke()
public ControllerResponse Invoke()
{
...
return new Json(myObj);
Expand Down Expand Up @@ -52,9 +52,9 @@ public void ConfigureServices(IServiceCollection services)
##### Asynchronous

```csharp
public class MyController : ControllerAsync<MyModel>
public class MyController : Controller2<MyModel>
{
public override async Task<ControllerResponse> Invoke()
public async Task<ControllerResponse> Invoke()
{
await ReadModelAsync();

Expand All @@ -68,9 +68,9 @@ public class MyController : ControllerAsync<MyModel>
JSON string will be deserialized to the controller model on first model access

```csharp
public class MyController : Controller<MyModel>
public class MyController : Controller2<MyModel>
{
public override ControllerResponse Invoke()
public ControllerResponse Invoke()
{
Model.
}
Expand Down

0 comments on commit 771d9af

Please sign in to comment.