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.
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. :(
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With