0

I'd like to know how the Entity Framework Code First creates the columns in a table.

1 - What is the name convention?

2 - Is there any way of knowing the "would-be" name of a column with a POCO property?

I need to compare the property name against the column name among other things.

Any help is much appreciated.

Thanks.

eestein
  • 4,914
  • 8
  • 54
  • 93
  • Strongly related: http://stackoverflow.com/questions/4425027/entity-framework-code-first-naming-conventions-back-to-plural-table-names – Gert Arnold Sep 25 '12 at 22:05
  • @GertArnold Strongly unrelated... I'm sorry, but that has nothing to do with my question besides the fact we both ask about naming conventions... – eestein Sep 26 '12 at 20:12

1 Answers1

1

I don't think you will be very happy with my answer, but I can point you to book "Programming Entity Framework: Code First" by By Julia Lerman, Rowan Miller (page 22 is where it starts). However, the topic is quite complex as convention may be overridden by configuration and actually the entire book is (more or less) about it. Have a look and see if it help.

Then I believe you can "guess" the name of column using convention rules, however, can you be sure that someone does not overridden it with configuration?

Mariusz.W
  • 1,347
  • 12
  • 19
  • That is true. But I'd be assuming a controlled environment, if it's different than the standard, it wouldn't be "my problem". Thanks for your answer. – eestein Oct 16 '12 at 17:45