I thought about splitting this up, but i think it's better as one big question. Here it goes. :-)
Warning: this question is in-depth. :-)
I've been working with ASP.NET for a little while now. Just a few days ago, after watching a course on MVC at Pluralsight, i decided to try it out. Development was amazing and very easy, especially with the Entity Framework 4.1. As i searched around for deployment options, i found AppHarbor. Unfortunately, i ran into some problems. See, i can't just magically port my databases over with the git commit AppHarbor requires. The problem is, I've never really worked with databases - they've always just worked automagically. I'm scared stiff of connection strings and the like. I managed to get a database set up on AppHarbor for the ASP.NET Membership stuff (I still need to figure out how to copy over the data and schemas, but i'll figure that out :-)) but i'm clueless on what to do about the Entity Framework SQL Server Compact database, which i'm using to store blog posts and comments. Problems:
Potential Solutions?
What's the best way to handle this situation? Not just this particular situation, but the general situation of "crap-i-hate-databases"?
Ways to answer:
Thanks so much in advance; I realize this is a deepish question and the rep garnered may not be worth it. Please let me know if i need to provide any more information.
From the Add New Item window, select ADO.NET Entity Data Model and set its Name as NorthwindModel and then click Add. Then the Entity Data Model Wizard will open up where you need to select EF Designer database option. Now the wizard will ask you to connect and configure the Connection String to the database.
Let's add one record from the browser by clicking the 'Create New' link. It will display the Create view. Let's add some data in the following field. Click on the Create button and it will update the Index view as well add this new record to the database.
In ASP.NET MVC, ViewModels are used to shape multiple entities from one or more models into a single object. This conversion into single object provides us better optimization.
I am going against the grain and suggest you do not use EF and generate a whole bunch of scaffolding code using MVC3. Simplify your app and really learn what is going on. That way you will be able to debug and add features.
Try taking your existing database and building an MVC3 app with Massive. Really simple and confrontable.You will get over your database phobia when you see how easy it is.
You may consider checking out a document database like Raven DB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With