Reputation: 32515
I know it sounds silly, but in regards to CA1709, should we ignore this error and just do what Microsoft did (which is use Db as the acronym for Database)?
Just wondering what people out there are doing. To me, it seems silly to use DB
when Microsoft uses Db
all over the place.
Upvotes: 5
Views: 858
Reputation: 25523
Quoting Brad Abrams in the excellent Framework Design Guidelines:
...I have heard every possible excuse for violating these naming guidelines. [...] For the most part, our customers have seen the places in which we have diverged from these guidelines (for even the best excuse) as warts in the Framework.
In other words, do as they say, not as they do. :)
Also, 'Db' is an abbreviation, not an acronym. Database is one word. Abbreviations should never be used in identifiers per the Guidelines. ('Id' is a special case.)
Sadly the CA1709 link lists 'DB' as an example. :(
Upvotes: 8
Reputation: 19020
It doesn't really matter, does it? Choose what you like best - but then make sure you use it consistently. With coding and naming conventions it's mainly about choosing one you like and be consistent
Upvotes: 5