Base solution for your next web application
Open Closed

How can i config my ASP.NET Core to connect from SQL Server and PostgreSQL #9326


User avatar
0
kwanp created

Hi My Project run on ASP.NET CORE & Angular How can i config my ASP.NET Core to connect from SQL Server and PostgreSQL because i have to get some data out from other server running PostgreSQL

Thank you

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @kwanp

    You can directly use https://github.com/npgsql/efcore.pg to connect to PostgreSQL. I assume you want AspNet Zero to work with SQL Server but get extra data from PostgreSQL.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    2
    BobIngham created

    @kwanp - if you need two database contexts (which is what I think you're asking) you can follow the instructions here: how to use multiple databases in aspnet zero Hope that helps.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    kwanp created

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)