feat(ActiveDirectoryController): add with GetAll endpoint
This commit is contained in:
parent
52d36004ae
commit
2bdc8ebafd
@ -0,0 +1,20 @@
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.DirectoryServices;
|
||||
namespace DigitalData.ActiveDirectory.API.Controllers;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ActiveDirectoryController : ControllerBase
|
||||
{
|
||||
private readonly IMediator _mediator;
|
||||
|
||||
public ActiveDirectoryController(IMediator mediator)
|
||||
{
|
||||
_mediator = mediator;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IEnumerable<ResultPropertyCollection>> GetAll([FromQuery] DirectorySearchQuery query) => await _mediator.Send(query);
|
||||
}
|
||||
@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\" />
|
||||
<ProjectReference Include="..\DigitalData.ActiveDirectory\DigitalData.ActiveDirectory.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user