❔ Database with SQL (coming from a Rails background)
So for those that don't know Rails, we generate our model like this
Then in the console we go
once the database is migrated, we enter the Rails console and start populating it. Here's an example.
Lo and behold. That just created a new product called "Sweater" and it's now in the database.
My question is can you do the same thing in the console with C# and ASP.NET?
rails g model product name:string (just one attribute for the example)Then in the console we go
rails db:migrateonce the database is migrated, we enter the Rails console and start populating it. Here's an example.
Product.create(name: "Sweater")Lo and behold. That just created a new product called "Sweater" and it's now in the database.
My question is can you do the same thing in the console with C# and ASP.NET?