Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serilog application layer database or serilog saving #28

Open
sak1065 opened this issue Jan 5, 2021 · 0 comments
Open

Serilog application layer database or serilog saving #28

sak1065 opened this issue Jan 5, 2021 · 0 comments

Comments

@sak1065
Copy link

sak1065 commented Jan 5, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant