To extend the answer to @Kelly, I also had to change the template, and since the template is created from another template, I need to change the source. There is a source template for each of the supported languages, but I suspect that most people will be able to cope with changing the English templates indicated by LCID 1033.
The files I found were:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\CSharp\Data\1033\DbCtxCSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\Web\CSharp\1033\DbCtxCSWSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplatesCache\CSharp\Data\1033\DbCtxCSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplatesCache\Web\CSharp\1033\DbCtxCSWSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VWDExpress\ItemTemplates\CSharp\Data\1033\DbCtxCSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VWDExpress\ItemTemplates\Web\CSharp\1033\DbCtxCSWSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WDExpress\ItemTemplates\CSharp\Data\1033\DbCtxCSEF6\CSharpDbContext.Types.tt C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WDExpress\ItemTemplates\Web\CSharp\1033\DbCtxCSWSEF6\CSharpDbContext.Types.tt
And to put the code snippet in a more appropriate context, this is what my "Simple Properties" section changed:
var simpleProperties = typeMapper.GetSimpleProperties(entity); if (simpleProperties.Any()) { foreach (var edmProperty in simpleProperties) { if (ef.IsKey(edmProperty)) { #> [System.ComponentModel.DataAnnotations.Key] <# } #> <#=codeStringGenerator.Property(edmProperty)#> <# } }
source share