Serilog application layer database or serilog saving
sak1065 opened this issue · 0 comments
sak1065 commented
Hello, I want to save my models to database or serilog.seq with serilog in business layer.
I tried the Webapi controller as follows, but there was no change in the console.
//**
public class ProductController : BaseApiController
{
private readonly ILogger _logger;
public ProductController(ILogger<ProductController> logger)
{
_logger = logger;
}
// GET: api/<controller>
[HttpGet]
public async Task<IActionResult> Get([FromQuery] GetAllProductsParameter filter)
{
var don = await Mediator.Send(new GetAllProductsQuery() { PageSize = filter.PageSize, PageNumber = filter.PageNumber });
_logger.LogError("log is here!");
return Ok(don);
}
etc..
**//
For example why always use entity framework and mssql !
i am using dapper and oracle db.
** I would be glad if you could help with this