Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Naming Conventions
Message
De
01/04/2015 11:51:33
 
 
À
01/04/2015 11:46:49
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01617625
Message ID:
01617631
Vues:
35
EF expects an s at the end of the table name by default. I don't think it confuses devs at all.

Also, I suggest not using Date in a field name as it's probably a DateTime. So, something like LastConfirmedDate becomes WhenConfirmed.

For Booleans, I use things like IsValidated or UseValidation, things that make sense when thinking about true/false.

>I would not recommend to put an "s" at the end of your table names. Unless in a very particular case, tables contain records so they are always assumed pluralized. This is also confusing developers when they code as they might not known if a table as an "s" or not at the end. The same thing goes with the field names. I would also avoid special characers. This is also a lot of confusion for developers when building the code. Instead of special characters, use caps letters where needed to represent a better readability of what a field name is for, for example, such as FirstName, LastName, LastConfirmedDate and UseFullValidation.
>
>A naming convention is good for as long as you feel ok with it and that it helps to implement standardization and structure. So, basically, whatever helps in that direction would be a good naming convention for you.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform