src/Misc/EFTools/EntityDesign/VisualStudio/EdmUtils.cs
// <summary>
//     Enable/Disable code generation for an edmx project item.
// </summary>
Enable/Disable code generation for an edmx project item.
Enable / Disable code generation for an edmx project item .
internal static Command SetCodeGenStrategyToNoneCommand(EFArtifact artifact)
        {
            Debug.Assert(artifact != null, "Artifact should not be null");
            var existingCodeGenStrategy = ModelHelper.GetDesignerPropertyValueFromArtifact(
                OptionsDesignerInfo.ElementName, OptionsDesignerInfo.AttributeCodeGenerationStrategy, artifact);
            if (string.IsNullOrWhiteSpace(existingCodeGenStrategy))
            {
                existingCodeGenStrategy = Resources.Default; 
            }
            if (!string.Equals(existingCodeGenStrategy, Resources.None))
            {
                return ModelHelper.CreateSetDesignerPropertyValueCommandFromArtifact(
                    artifact, OptionsDesignerInfo.ElementName,
                    OptionsDesignerInfo.AttributeCodeGenerationStrategy,
                    Resources.None);
            }
            return null;
        }
internal static Command SetCodeGenStrategyToNoneCommand ( EFArtifact artifact ) { Debug . Assert ( artifact != null , " " ) ; var existingCodeGenStrategy = ModelHelper . GetDesignerPropertyValueFromArtifact ( OptionsDesignerInfo . ElementName , OptionsDesignerInfo . AttributeCodeGenerationStrategy , artifact ) ; if ( string . IsNullOrWhiteSpace ( existingCodeGenStrategy ) ) { existingCodeGenStrategy = Resources . Default ; } if ( ! string . Equals ( existingCodeGenStrategy , Resources . None ) ) { return ModelHelper . CreateSetDesignerPropertyValueCommandFromArtifact ( artifact , OptionsDesignerInfo . ElementName , OptionsDesignerInfo . AttributeCodeGenerationStrategy , Resources . None ) ; } return null ; }
Enable/Disable code generation for an edmx project item.
Enable / Disable code generation for an edmx project item .
// which is the default value of CodeGenerationStrategy attribute
artifact
EFArtifact