C
C#2d ago
Mihneas22

Database In ASP.Net Core

Hello! So basically we all know when we create a SQL Database in Visual Studio Community with EF and SQLServer and we can store data there. My question is this: when we add the app to a website like Heroku or a Hosting App in order to publish it to the web, does the database with all the data gets added too or is there a separate process for that? Thanks!
9 Replies
WAASUL
WAASUL2d ago
No you will have to host the database aswell. If it's an in memory database then no. You don't want an in memory database though. You can for instance use Azure Sql Database. Then your server will connect to it using a connection string.
Mihneas22
Mihneas22OP2d ago
(localdb)\MSSQLLocalDB; if it's like this it is memory built in or not?
glhays
glhaysthis hour
No not a memory db, that is a lightweight db shipped as part of vs. You can us SqlLite. The SQL database that is a file you can use in your Visual Studio solution is SQLite. SQLite is a self-contained, serverless, zero-configuration, transactional SQL database engine. It stores the entire database in a single file, making it easy to manage and deploy within your solution.
SuperBrain
SuperBrain18h ago
@Mihneas22 what is your application for and how many people are going to use it at the same time? Also, how is your application using your database? Do you have a large amount of data and do you need multiple users to be able to access the same database at the same time? Depending on how you answer these questions, we can tell you what kind of RDBMS you want/need to use.
Mihneas22
Mihneas22OP9h ago
Well My application is an API done with Clean Arhitecture
Mihneas22
Mihneas22OP9h ago
No description
Mihneas22
Mihneas22OP9h ago
I plan to post my APP on Rapid API so I can't really determine how well it is going to do My application is using the database by retrieving data in order so show to the use. For example let's say the use wants to get a nutritional fact from my API. It will access the database and the retrieve the data
becquerel
becquerel6h ago
you will probably be fine with sqlite unless you are getting many thousands of users, assuming you have it configured correctly and are using patterns like async/await well azure sql database would be very scalable though, it's just sql server hosted in the cloud for you
Mihneas22
Mihneas22OP6h ago
yes i did
Want results from more Discord servers?
Add your server