fixup child contrlller and add debugging to http handler

This commit is contained in:
honzapatCZ 2025-04-04 16:46:17 +02:00
parent 449c269828
commit 78439c95e4
2 changed files with 7 additions and 5 deletions

View File

@ -53,7 +53,8 @@ namespace NejCommon.Controllers
public virtual bool Trackable => true;
[NonAction]
public virtual TType GetQueryHelper(TOwner owner){
public virtual TType GetQueryHelper(TOwner owner)
{
var entity = GetQuery(owner);
if (entity == null)
{
@ -99,6 +100,7 @@ namespace NejCommon.Controllers
//Console.Writeline(inv.InvoiceItems.Count);
}*/
body.ApplyTo(providers, entity);
Assign(owner, entity);
var res = await db.ApiSaveChangesAsyncOk<TType, TUpdateResponse>(providers, entity);

View File

@ -43,20 +43,20 @@ public class HttpDebuggingHandler : DelegatingHandler
}
}
output.AppendLine($"{msg}==========End==========");
Logger.LogInformation(output.ToString());
var start = DateTime.Now;
var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
var end = DateTime.Now;
output.AppendLine($"Duration: {end - start}");
output.AppendLine($"{msg}==========End==========");
Logger.LogInformation(output.ToString());
output.Clear();
msg = $"[{id} - Response]";
output.AppendLine($"{msg}=========Start=========");
output.AppendLine($"Duration: {end - start}");
var resp = response;