Click here to Skip to main content
15,903,012 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
AnswerRe: Code First, do you like it? Pin
Foothill10-Feb-16 3:06
professionalFoothill10-Feb-16 3:06 
AnswerRe: Code First, do you like it? Pin
Tom Deketelaere10-Feb-16 3:41
professionalTom Deketelaere10-Feb-16 3:41 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 3:51
professionalSlacker00710-Feb-16 3:51 
AnswerRe: Code First, do you like it? Pin
User 483504710-Feb-16 3:42
User 483504710-Feb-16 3:42 
AnswerRe: Code First, do you like it? Pin
Duncan Edwards Jones10-Feb-16 4:03
professionalDuncan Edwards Jones10-Feb-16 4:03 
GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 4:35
professionalSlacker00710-Feb-16 4:35 
GeneralRe: Code First, do you like it? Pin
Duncan Edwards Jones10-Feb-16 4:42
professionalDuncan Edwards Jones10-Feb-16 4:42 
AnswerRe: Code First, do you like it? Pin
Dave Kreskowiak10-Feb-16 4:29
mveDave Kreskowiak10-Feb-16 4:29 
I'm working on a project right now and we used Code First.

There's some nice stuff about it if you keep your database simple, but what database ever ends up being simple, right? Stuff like Migrations can make changes very easy to implement but others a real pain in the ass.

If you've got a very small team, like under 5 people, Migrations can be easy to manage. If not, it can be a huge pain. It's probably best to keep the Migrations limited to just a few people on the team until the database is fleshed out. Multiple people putting in migrations on the same table at the same time can make your life miserable. We ran into a couple of problems like this and I'm one of two people working on this project. If you're going to have multiple people doing Migrations coordination of those changes is paramount. I can't stress that enough. If you want to avoid problems, you have to make sure no two people are making changes to the same table at the same time.

You REALLY have to understand your data and how relationships work before you even think of starting with Code First. Code First isn't the best when determining how it's going to setup a relationship and you really have to know your DB stuff to make sure it's getting it correct.

When Code First doesn't get a relationship correct or exactly the way you want it there is a rather steep learning curve to the syntax to configure it correctly and it only gets steeper if you don't know enough of the detail of how the database side works and the terminology involved.

Would I use Code First again? Sure, but not for large projects. I'd keep it to smaller ones only.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: Code First, do you like it? Pin
Slacker00710-Feb-16 4:37
professionalSlacker00710-Feb-16 4:37 
AnswerRe: Code First, do you like it? Pin
Marco Bertschi10-Feb-16 5:24
protectorMarco Bertschi10-Feb-16 5:24 
AnswerRe: Code First, do you like it? Pin
pkfox10-Feb-16 5:32
professionalpkfox10-Feb-16 5:32 
GeneralRe: Code First, do you like it? Pin
PIEBALDconsult10-Feb-16 12:44
mvePIEBALDconsult10-Feb-16 12:44 
AnswerRe: Code First, do you like it? Pin
dazfuller10-Feb-16 20:49
dazfuller10-Feb-16 20:49 
AnswerRe: Code First, do you like it? Pin
Flo Lee10-Feb-16 20:54
Flo Lee10-Feb-16 20:54 
AnswerRe: Code First, do you like it? Pin
dietmar paul schoder10-Feb-16 21:38
professionaldietmar paul schoder10-Feb-16 21:38 
AnswerRe: Code First, do you like it? Pin
Quirkafleeg10-Feb-16 21:42
Quirkafleeg10-Feb-16 21:42 
AnswerRe: Code First, do you like it? Pin
boarderstu11-Feb-16 0:53
boarderstu11-Feb-16 0:53 
AnswerRe: Code First, do you like it? Pin
Member 1223953511-Feb-16 1:12
Member 1223953511-Feb-16 1:12 
AnswerRe: Code First, do you like it? Pin
Nathan Minier11-Feb-16 1:42
professionalNathan Minier11-Feb-16 1:42 
GeneralRe: Code First, do you like it? Pin
Slacker00711-Feb-16 2:17
professionalSlacker00711-Feb-16 2:17 
GeneralRe: Code First, do you like it? Pin
Nathan Minier11-Feb-16 2:27
professionalNathan Minier11-Feb-16 2:27 
AnswerRe: Code First, do you like it? Pin
Josh Go11-Feb-16 3:51
Josh Go11-Feb-16 3:51 
GeneralRe: Code First, do you like it? Pin
Slacker00711-Feb-16 6:01
professionalSlacker00711-Feb-16 6:01 
AnswerRe: Code First, do you like it? Pin
canoeman11-Feb-16 14:00
canoeman11-Feb-16 14:00 
AnswerRe: Code First, do you like it? Pin
rjemp11-Feb-16 17:00
rjemp11-Feb-16 17:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.