Does MVC need a darabase or API if I want the user to make changes to the page? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Does MVC need a darabase or API if I want the user to make changes to the page?

My MVC contains a list of products. My goal: all products that the user clicks get stored somewhere in the codebehind and at 'checkout', I get an email with the list of all clicked products. Does my MVC require a database for this? do I need an API? And if I do need a database, whats the best way to create it for production? I apologize if the question is silly, but I am new to this. Thanks in advance!

25th Feb 2020, 8:56 AM
Rene Krajnc
Rene Krajnc - avatar
5 Answers
+ 1
Database model is the most important part of product website, without it, the website only consists of static pages, it can't save pages, register/login users, update products and take orders.
25th Feb 2020, 10:30 AM
Calviղ
Calviղ - avatar
0
How do you build your MVC? As you know MVC stands for Models, Views and Controllers; you should use Models to access your database.
25th Feb 2020, 9:02 AM
Calviղ
Calviղ - avatar
0
I don't use a database. Not yet. I'm wondering if I need one for my purposes
25th Feb 2020, 10:14 AM
Rene Krajnc
Rene Krajnc - avatar
0
Thanks for this insight, I didn't know thats how it is. This will help me a great deal.
25th Feb 2020, 10:34 AM
Rene Krajnc
Rene Krajnc - avatar
0
I may have a database and not even know it. It will be a small project, so I will use Sqlite. Thanks a lot
25th Feb 2020, 10:36 AM
Rene Krajnc
Rene Krajnc - avatar