EF Core Beziehungskonfiguration für Envelope-Entität korrigiert

This commit is contained in:
Developer 02
2024-04-04 13:25:41 +02:00
parent 8de0d70e7b
commit 29ae546d98
29 changed files with 282 additions and 45 deletions

View File

@@ -3,6 +3,7 @@ using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Web.Controllers
{
@@ -10,7 +11,23 @@ namespace EnvelopeGenerator.Web.Controllers
{
public TestEnvelopeController(ILogger<TestEnvelopeController> logger, IEnvelopeService service) : base(logger, service)
{
}
[NonAction]
public override Task<IActionResult> GetAll()
{
return base.GetAll();
}
[HttpGet]
public virtual async Task<IActionResult> GetAll([FromQuery] bool withDocuments = false, [FromQuery] bool withReceivers = false, [FromQuery] bool withHistory = false)
{
var result = await _service.ReadAllWithAsync(documents: withDocuments, receivers: withReceivers, history: withHistory);
if (result.IsSuccess)
{
return Ok(result);
}
return NotFound(result);
}
}
}