locked
How can I link to sqlserver or sqlite in blazor client project? RRS feed

  • Question

  • User2076108182 posted

    I have a blazor client project .

    How can I link to sqlserver or sqlite in blazor client project?

    directlly to database ,no sercice or api?Is that possible?

    thanks for your help.

    Thursday, October 17, 2019 2:06 AM

Answers

  • User475983607 posted

    How can I link to sqlserver or sqlite in blazor client project?

    directlly to database ,no sercice or api?Is that possible?

    It's not possible to connect to a remote SQL database with out sending an HTTP request.  You can, however, use local resources within the browser.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 17, 2019 11:11 AM
  • User-821857111 posted

    Blazor on WebAssembly runs in the same security context as JavaScript, and is therefore subject to the same limitations as Javascript when it comes to accessing resources outside of its process. You will need an API.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 17, 2019 11:42 AM

All replies

  • User475983607 posted

    How can I link to sqlserver or sqlite in blazor client project?

    directlly to database ,no sercice or api?Is that possible?

    It's not possible to connect to a remote SQL database with out sending an HTTP request.  You can, however, use local resources within the browser.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 17, 2019 11:11 AM
  • User-821857111 posted

    Blazor on WebAssembly runs in the same security context as JavaScript, and is therefore subject to the same limitations as Javascript when it comes to accessing resources outside of its process. You will need an API.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, October 17, 2019 11:42 AM