DataTable naming conventions and Entity Framework 4.0

curiouswebster used Ask the Experts™
I am new to EF4 but find that it's most easy to alow your table names to become your exact object names without needed to add capitalization, for example.

A "customer" table that maps to a "Customer" object requires the developer to modify the object name in the .EDMX designer. The problem is when you need to delete tables and re-add them, the program will not compile until you rename "customer" to "Customer".

That will become a pain when I have lots of table to rename.

So I want to rename the table to Customer but was told the convention there was to use lower case.

My question is whether that's a convention coming from the Open Source/LAMP end of the spectrum?  We are using .NET Framwork and I wonder about the convention in the Microsoft world.

Please let me know if Customer is a more convention table name than customer.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2008
Let me start by saying that there aren't any "coding convention police" out there who will get you in trouble for not following their rules.  I don't remember seeing anything driving "customer" vs. "Customer".  For me, it is about my preferences, and the heck with what the rest of the world thinks.  I do what is comfortable, and achievable for me.  Conventions are suggestions, not mandatory, but I understand following a set of guidelines if you are going to be publishing stuff for public consumption.  

I saw your related question, about renaming entities in the model designer, and it is my contention that it can be maintenance headache when you have 100's of tables and 1000's of columns that you have to rename.  It is a better practice to have the correct names in the database (i.e. not using plural names -- Customer vs. Customers), so that the names make sense in the model.
curiouswebsterSoftware Engineer


Thanks.  I completely agree.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial