Home > Back-end >  Why to initial my ASP.NET MVC local database by code-first? Why add to some dummy data by code first
Why to initial my ASP.NET MVC local database by code-first? Why add to some dummy data by code first

Time:08-18

I know what is the difference between two approaches, code-first vs. database-first. I am trying to add some dummy data to my ASP.NET MVC project. All the examples I saw used code first.

What is the problem to do that manually? What is the difference?

As we can see in the attached screenshot, I just can right click the database table --> view data, and add the dummy manually.

Is any problem about doing that?

enter image description here

CodePudding user response:

When you add dummy records manually to your database, i think its okay for you to test your coding only by get data or "Select" in query. But, if you want to insert new data to your table, it's usefull because not only you insert your dummy data to you database, you are testing your query and your code by inserting your data using your code.

  • Related