Well, it depends on how you look at it. I guess its perhaps a limitation because it does expect certain naming conventions, but you could easily save that codesmith template with a new name and modify it to work in your situation. The issue is that this template is only distinguishing the private property and the public property by case (which is my preference and standard), so the private property is like this:
private DateTime createdUtc = DateTime.UtcNow;
and the public property is like this:
public DateTime CreatedUtc
{
get { return createdUtc; }
set { createdUtc = value; }
}
But if your table column names are already all lower case, the logic in the script which creates the property names doesn't work. The function in the script to get the private name is just lower casing the first letter like this:
public string GetPrivateName(string ColumnName)
{
return ColumnName.Substring(0,1).ToLower() + ColumnName.Substring(1,ColumnName.Length -1);
}
You might need to change that method to prefix the private variable with an underscore _ to make it work with your db naming conventions. I use casing in my db column names, like for the above example my db column is CreatedUtc.
So I guess my db naming conventions are adapted to make it easy to generate clean code easily. I don't use underscores in db column names for example partly because I don't want underscores in the C# property names.
Hope it helps,
Joe