First letter always uppercase

Posts   
 
    
softwarea
User
Posts: 57
Joined: 05-Mar-2007
# Posted on: 23-Feb-2010 10:53:02   

Hi,

I have an entity called 'Application'. I wanted to rename this entity to 'myApplication' (starting with lowercase m), but the designer won't let me. What ever I do, I end up with "MyApplication'.

Is there any way how I can turn off this behaviour?

I already set EnforcePascalCasingAlways and MakeElementNamePascalCasing to false, in both File->Preferences and Project->Properties.

Using LLBL Gen Pro 2.6

Thanks guys!

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 23-Feb-2010 11:10:45   

The first character will always be UpperCase.

Why do you want to change this?

normanlc
User
Posts: 62
Joined: 10-Jan-2007
# Posted on: 17-Jun-2010 21:15:16   

I have a similar scenerio...

The designer names my project, class for the Context (LINQ to SQL), with first letter upper case and then lower case...

i.e. "dMPro" is the name I desire, but I get "Dmpro" when generated. How can that be set to accept what we type rather than what the designer decided it should be named? Shouldn't "capitalization" be an option rather than hardcoded?

Thanks

normanlc
User
Posts: 62
Joined: 10-Jan-2007
# Posted on: 17-Jun-2010 21:19:37   

Sorry, I'm using v3.0 and just notice the original question pertained to v2.6

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 17-Jun-2010 23:06:13   

Sorry, this can't be changed. This is because MS guidelines for class naming define all class names to be PascalCased.

Matt

normanlc
User
Posts: 62
Joined: 10-Jan-2007
# Posted on: 18-Jun-2010 08:33:01   

But yet you Solutions Design allows LLBLGen Pro to "turn off" PascalCase for Entities? Isn't that a paradox? Is it a requirement for certification from MS enabling companies to utilize the MS logo etc. If so, it doesn't explain the feature option on name entity classes verses DataContext class and/or file naming. Or, I'm missing something here.

Thanks for your response

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-Jun-2010 09:30:28   

But yet you Solutions Design allows LLBLGen Pro to "turn off" PascalCase for Entities? Isn't that a paradox?

There is an option to turn PasCal casing off, for cases when someone uses abbreviations and wants uppercase for consecutive characters.

But anyway the first letter remains in UpperCase.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Jun-2010 10:49:23   

'Thisisatest' isn't in violation of the guidelines of MS. The first character is made uppercase as it's otherwise a big pain in general to fix it afterwards. It's a convention we don't move away from. It's good practice to use this naming guidelines for your own code as well, as it's rare in the .NET world that class / type names start with a lowercase character: it helps readability of the code. Same for method names: it's then consistent with .NET BCL's types/classes. In Java this is different and there too one in general follows the guidelines of the platform (i.e. camelcased method names)

Frans Bouma | Lead developer LLBLGen Pro
normanlc
User
Posts: 62
Joined: 10-Jan-2007
# Posted on: 18-Jun-2010 16:15:07   

Thank you for your responses - they are much appreciated. I agree with everything you say, but as usual there are exceptions from time to time. i.e. remember the ol' dB... this and dB... that because "dBase II/dBase III/dBase III+" was part of a trademark/accepted reference (whatever you want to label it) - well in our case "dM" is in the same classification or "doubleM" as the name of the company starts with doubleM.

I'm showing my age by knowing the "dB" reference - but it's true, it's true simple_smile

Again, thank you for your responses...

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 21-Jun-2010 09:28:43   

We acknowledge that you have a point here. But changing things inside the designer for this might not be the best thing to do, as it affects all names, and it will certainly lead to pain with elements created through reverse engineering, where table names are all lowercase for example...

Posts: 13
Joined: 04-May-2015
# Posted on: 06-May-2015 16:25:27   

MTrinder wrote:

Sorry, this can't be changed. This is because MS guidelines for class naming define all class names to be PascalCased.

Matt

But are they not just guidelines? I jsut ran into this as well and would like the option to leave the database table name alone, and not uppercase the first letter. Looks and feels weird in my case and neither EF nor VS has had any problems with all lower case class names in the past. Would it actually break anything in LLBLGen if a class name was all lower case?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 06-May-2015 17:28:21   

It wouldn't break anything of course, but you're stuck with a name in your code like that (as the name is used in the code with the first character uppercased). We do it this way as lots of users use the fxcop analysis in vs.net which has this in the ruleset. That of course could be made optional in theory, but as it's a detail which in general isn't recommended, we didn't make it optional.

Frans Bouma | Lead developer LLBLGen Pro