// Controllers/LocationsController.cs using Berufsschule_HAM.Services; using Microsoft.AspNetCore.Mvc; using System.Threading.Tasks; [Route("[controller]")] public class LocationsController : Controller { private readonly LdapService _ldap; public LocationsController(LdapService ldap) => _ldap = ldap; [HttpGet("Index")] public async Task>> Index() { IEnumerable> list = await _ldap.ListLocationsAsync(); return list; } }