File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -189,10 +189,6 @@ The analyzer follows the standard analyzer development patterns, and building th
189189
190190Below you will find a full example showing you how to map a collection of type Product to a collection of type ProductDto.
191191
192- {% hint style="warning" %}
193- The example below uses UmbracoApiController which is obsolete in Umbraco 14 and will be removed in Umbraco 15.
194- {% endhint %}
195-
196192``` csharp
197193#region Models
198194
@@ -241,13 +237,15 @@ public class ProductComposer : IComposer
241237
242238#endregion
243239
244- public class ProductsController : UmbracoApiController
240+ [ApiController ]
241+ [Route (" /umbraco/api/products" )]
242+ public class ProductsController : Controller
245243{
246244 private readonly IUmbracoMapper _mapper ;
247245
248246 public ProductsController (IUmbracoMapper mapper ) => _mapper = mapper ;
249247
250- [HttpGet ]
248+ [HttpGet ( " getall " ) ]
251249 public HttpResponseMessage GetAll ()
252250 {
253251 var products = FakeServiceCall ();
@@ -256,7 +254,7 @@ public class ProductsController : UmbracoApiController
256254 return Request .CreateResponse (HttpStatusCode .OK , mapped );
257255 }
258256
259- [HttpGet ]
257+ [HttpGet ( " getfirstproduct " ) ]
260258 public HttpResponseMessage GetFirstProduct ()
261259 {
262260 var product = FakeServiceCall ().First ();
You can’t perform that action at this time.
0 commit comments