Skip to content

Commit 7e5d340

Browse files
Update v15
1 parent 12f2b2c commit 7e5d340

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

15/umbraco-cms/reference/using-ioc.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,13 @@ The example below uses UmbracoApiController which is obsolete in Umbraco 14 and
231231

232232
```csharp
233233
using IOCDocs.Services;
234-
using Umbraco.Cms.Web.Common.Controllers;
234+
using Microsoft.AspNetCore.Mvc;
235235

236236
namespace IOCDocs.Controllers;
237237

238-
public class FooController : UmbracoApiController
238+
[ApiController]
239+
[Route("/umbraco/api/foo")]
240+
public class FooController : Controller
239241
{
240242
private readonly IFooBar _fooBar;
241243

@@ -244,6 +246,7 @@ public class FooController : UmbracoApiController
244246
_fooBar = fooBar;
245247
}
246248

249+
[HttpGet("foo")]
247250
public string Foo()
248251
{
249252
var bar = _fooBar.Foo();

0 commit comments

Comments
 (0)