diff --git a/Controllers/AutoChildController.cs b/Controllers/AutoChildController.cs index 9ce6ee7..08e2b2d 100644 --- a/Controllers/AutoChildController.cs +++ b/Controllers/AutoChildController.cs @@ -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(providers, entity); diff --git a/Utils/HttpDebuggingHandler.cs b/Utils/HttpDebuggingHandler.cs index 54c768a..66c4144 100644 --- a/Utils/HttpDebuggingHandler.cs +++ b/Utils/HttpDebuggingHandler.cs @@ -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;