EF Core Beziehungskonfiguration für Envelope-Entität korrigiert
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user