Share via

Best Practice For Database Access In Blazor MAUI Hybrid App

Daniel Kovach 0 Reputation points
2024-04-30T17:24:11.6166667+00:00

I'm porting a project from MVC into a Blazor MAUI Hybrid app with the intent to share common components and data. I have a Razor Class Library which does this, but was wondering if I should also put my SQL Server data access in here as well or keep that in the Blazor web project?

Developer technologies | .NET | Blazor
Developer technologies | .NET | .NET Multi-platform App UI
SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

2 answers

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,166 Reputation points Microsoft External Staff
    2024-05-09T08:37:05.3666667+00:00

    Hello,

    For MAUI blazor applications, the best practices for the application database are no different from MAUI. Therefore, it is recommended that you refer to the following official documentation.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

  2. Bruce (SqlWork.com) 84,081 Reputation points
    2024-04-30T18:30:11.3766667+00:00

    I would assume a Maui app would call a webapi to do database access (unless it's a local SqlLite database). But even in this case I expect a separate project for the database layer.

    Was this answer helpful?

    0 comments No comments