You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.NodeServices/README.md
+3-21Lines changed: 3 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,30 +63,12 @@ public void ConfigureServices(IServiceCollection services)
63
63
}
64
64
```
65
65
66
-
Now you can receive an instance of `NodeServices` as a constructor parameter to any MVC controller, e.g.:
66
+
Now you can receive an instance of `NodeServices` as an action method parameter to any MVC action, and then use it to make calls into Node.js code, e.g.:
67
67
68
68
```csharp
69
-
usingMicrosoft.AspNetCore.NodeServices;
70
-
71
-
publicclassSomeController : Controller
72
-
{
73
-
privateINodeServices_nodeServices;
74
-
75
-
publicSomeController(INodeServicesnodeServices)
76
-
{
77
-
_nodeServices=nodeServices;
78
-
}
79
-
80
-
// ... your action methods are here ...
81
-
}
82
-
```
83
-
84
-
Then you can use this instance to make calls into Node.js code, e.g.:
0 commit comments