Tuesday, 6 September 2011

EDMX or DbContext API

Hi all,

I have used EF for a while. I am used to using an EDMX file for my model. I have also recently used Code First and the DbContext API and I really like this.
Last night I started building an app. and was thinking, am I starting on the right foot? Do I use EDMX or DbContext API? If the thing i'm building turns out to be big, will I have chosen the right technology.

What if I use DbContext API and get it to generate my database. Obviously I don't want this to keep generating my database down the track when i'm at a stable point in development (or do I?). Then if I want to tweak my database or domain model will all the strings come un done?

The DbContext API is a simplified version. Will it do everything I need? I dont think ill need stored procedures as I can do everything with linq.

So my real question is. If I am building something that is serious and out there is the real world and it may turn out to require some complex coding, which way do I go? EDMX or DbContext API?

Is EDMX now old school? 

Comments / thoughts?