We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59fb035 commit 12f2b2cCopy full SHA for 12f2b2c
14/umbraco-cms/reference/using-ioc.md
@@ -231,11 +231,13 @@ The example below uses UmbracoApiController which is obsolete in Umbraco 14 and
231
232
```csharp
233
using IOCDocs.Services;
234
-using Umbraco.Cms.Web.Common.Controllers;
+using Microsoft.AspNetCore.Mvc;
235
236
namespace IOCDocs.Controllers;
237
238
-public class FooController : UmbracoApiController
+[ApiController]
239
+[Route("/umbraco/api/foo")]
240
+public class FooController : Controller
241
{
242
private readonly IFooBar _fooBar;
243
@@ -244,6 +246,7 @@ public class FooController : UmbracoApiController
244
246
_fooBar = fooBar;
245
247
}
248
249
+ [HttpGet("foo")]
250
public string Foo()
251
252
var bar = _fooBar.Foo();
0 commit comments