Does a SQL Server database, .NET API and Angular front end require three servers?

hpbcrowe 31 Reputation points
2022-07-09T05:24:45.73+00:00

I have built an application that uses SQL Server as the database, I used Dapper as the ORM, .NET for the API and the front end is Angular. Do I need a separate server in Azure for each? Since the Database is in SQL server is there an easy way to move it to Azure or do I have to run all of the queries to make the tables and the stored procedures, views in Azure, since I used Dapper?
Can you point me to some step by step instructions to deploy my project?
Is there common mistakes I need to look out for?

Thank you for your help.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 71,586 Reputation points
    2022-07-09T19:23:39.397+00:00

    For security you often do not want the fronted server to directly access the database, but rather use an webapi project. It is not clear if you did a web project or static web project and a separate webapi project.

    If you built you angular as a static site and a webapi site using angular dev servers proxy support, then you want an azure static site for the frontend and config the api to a web app ir azure functions

    If the angular site is core site, then deploy as webapp and the optional webapi as webapp

    You have several Sqlserver deployment options for azure.

    • You can create a database project in visual studio and deploy the project. You can check in to GitHub and use GitHub actions to deploy.
    • You can attach with azure data studio and run scripts.
    • You can use azure database console and run commands
    • You can add startup code in the .net app to create the database
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.