Я пробовал это следующим образом:
Код: Выделить всё
app.MapPut($"/{controllerName}", async ([FromBody] BasisTypeDto dto, IRepository repo, HttpRequest request, HttpContext context) => {
BuilderMinimalApiActionResult.MakeActionResult(Crud.Update(dto, repo, host, DefaultElasticIndex)); }
)
.AddEndpointFilter(async (efiContext, next) => {
var s = efiContext.HttpContext.Features.Get();
s.AllowSynchronousIO = true;
var reader = new StreamReader(efiContext.HttpContext.Request.Body);
var rawMessage = reader.ReadToEnd();
return await next(efiContext);
})
Подробнее здесь: https://stackoverflow.com/questions/791 ... et-minimal
Мобильная версия