var newInvoice = new Invoice();
newInvoice.Name = "2022/12/12"
newInvoice.Value = 5m;
await _dbContext.Invoices.AddAsync(newInvoice);
await _SaveChangesAsync();
//Save logs what SQL send to database or save expcetion/error message
var newInvoiceLog = new InvoiceLog();
newInvoiceLog.InvoiceId = newInvoice.Id; // id of new created entity
newInvoiceLog.RawQuery = //<----- that i missing, single string that going to DB like Logging to debug console
var newInvoice = new Invoice();
newInvoice.Name = "2022/12/12"
newInvoice.Value = 5m;
await _dbContext.Invoices.AddAsync(newInvoice);
await _SaveChangesAsync();
//Save logs what SQL send to database or save expcetion/error message
var newInvoiceLog = new InvoiceLog();
newInvoiceLog.InvoiceId = newInvoice.Id; // id of new created entity
newInvoiceLog.RawQuery = //<----- that i missing, single string that going to DB like Logging to debug console