fixup child contrlller and add debugging to http handler
This commit is contained in:
parent
449c269828
commit
78439c95e4
|
|
@ -53,7 +53,8 @@ namespace NejCommon.Controllers
|
||||||
public virtual bool Trackable => true;
|
public virtual bool Trackable => true;
|
||||||
|
|
||||||
[NonAction]
|
[NonAction]
|
||||||
public virtual TType GetQueryHelper(TOwner owner){
|
public virtual TType GetQueryHelper(TOwner owner)
|
||||||
|
{
|
||||||
var entity = GetQuery(owner);
|
var entity = GetQuery(owner);
|
||||||
if (entity == null)
|
if (entity == null)
|
||||||
{
|
{
|
||||||
|
|
@ -99,6 +100,7 @@ namespace NejCommon.Controllers
|
||||||
//Console.Writeline(inv.InvoiceItems.Count);
|
//Console.Writeline(inv.InvoiceItems.Count);
|
||||||
}*/
|
}*/
|
||||||
body.ApplyTo(providers, entity);
|
body.ApplyTo(providers, entity);
|
||||||
|
Assign(owner, entity);
|
||||||
|
|
||||||
var res = await db.ApiSaveChangesAsyncOk<TType, TUpdateResponse>(providers, entity);
|
var res = await db.ApiSaveChangesAsyncOk<TType, TUpdateResponse>(providers, entity);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,20 @@ public class HttpDebuggingHandler : DelegatingHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output.AppendLine($"{msg}==========End==========");
|
||||||
|
Logger.LogInformation(output.ToString());
|
||||||
|
|
||||||
var start = DateTime.Now;
|
var start = DateTime.Now;
|
||||||
|
|
||||||
var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
|
var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
|
||||||
|
|
||||||
var end = DateTime.Now;
|
var end = DateTime.Now;
|
||||||
|
|
||||||
output.AppendLine($"Duration: {end - start}");
|
|
||||||
output.AppendLine($"{msg}==========End==========");
|
|
||||||
Logger.LogInformation(output.ToString());
|
|
||||||
|
|
||||||
output.Clear();
|
output.Clear();
|
||||||
|
|
||||||
msg = $"[{id} - Response]";
|
msg = $"[{id} - Response]";
|
||||||
output.AppendLine($"{msg}=========Start=========");
|
output.AppendLine($"{msg}=========Start=========");
|
||||||
|
output.AppendLine($"Duration: {end - start}");
|
||||||
|
|
||||||
var resp = response;
|
var resp = response;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user