My first blog and it's about giving back to the community I've received so much from.
Recently decided to concentrate my efforts on MVC4, Entity Framwork 4.1 and Firebird after spending a year trying to master Silverlight with MVVM. A recent post on Single Page Application Overview By Brad Severtson led me to his great presentation given by Steve Sanderson (http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2159). As I'm more interested in Database First development and given that code first is the preferred method shown in examples, I decided to try and convert the beta example with Firebird and Database First. The results of my journey are below. Products used: Microsoft MVC4 Beta with the latest SPA templates, Firebird 2.5 and Firebird 2.7.5 asp dotnet drivers.
Preexisting Firebird database used in my examples.Data View
Nuget update for SPA template
Make sure you arUsing EF 4.1 and Select ADO.NET Entity Data Model
Use SPA1Context for all naming
Select a few Tables. Products used in test
Make all keys Identity type
Code generation item to make a simple DB Context.
Select ADO.Net DbContext
A review of model
This is what got created.
Must do a build before using Controllers
Add new Controller
Select options for dropdowns
Important to select SPA1ContextEntities
Add Product to Main Menu in _Layout.cshtml
Edit to change a product. No postbacks occur.
A view of changed products before saving. All modified rows are hi-lighted
View after pressing save button
View of data stored in table