2

I'm about to develop some LOB applications using VS2012, WPF, Sql Server Express 2012, Unity, Prism.

I don't have legacy applications to care about.

Is it ok if I choose the Model First workflow for my upcoming projects, are there some important benefits in the Code First workflow that I would not be receiving?

If there's any that I could not overlook, then could I start with Model First and then switch to Code First?, it happens that I'm more confortable designing databases with the designer than by code, this is the main reason for this question.

woz
  • 10,888
  • 3
  • 34
  • 64
Rafael
  • 2,413
  • 4
  • 32
  • 54

2 Answers2

5

If you're more comfortable working with databases first, I would go down that route. This question has a lot of pros/cons for each.

I've recently used code first for a project and I regret that decision. Although it is incredibly powerful, it was an unnecessary learning curve and ultimately took far too long to setup a simple schema.

If you want to learn how code first works, and time isn't an issue, then you may as well go for it. Else, what do you really have to gain from it?

Ultimately though, if you're developing it and you already have a sufficient skill set in one of these, use it.

Community
  • 1
  • 1
Joe
  • 7,113
  • 1
  • 29
  • 34
  • According to that, I'll use Database first, since I also like to write Stored Procedures in SQL Server – Rafael Jan 17 '14 at 15:47
  • Good luck! Just to clarify, I'm not opposed to code-first at all, and if you get chance at some point, it's definitely worth reading up on. – Joe Jan 17 '14 at 15:53
  • 2
    I guess so, I now think that if you have the opportunity to work in an easier way, why complicate things? – Rafael Jan 17 '14 at 15:55
1

I have created WPF applications using code first and MVVM patterns + DI (though not Prism).

It took a while to convince me to move away from the edmx models, but I've found Code First to be a much cleaner approach, with no apparent downsides.

I think you could easily move to model first from code first, though you probably wont need to. I haven't tried it - you might need automapper.

I have successfully taken existing dbs and moved over to CF though it is a bit messier.

JsAndDotNet
  • 16,260
  • 18
  • 100
  • 123