public static void SetStoreGeneratedPattern( this EdmProperty property, StoreGeneratedPattern storeGeneratedPattern) { DebugCheck.NotNull(property); MetadataProperty metadataProperty; if (!property.MetadataProperties.TryGetValue( XmlConstants.StoreGeneratedPatternAnnotation, false, out metadataProperty)) { property.MetadataProperties.Source.Add( new MetadataProperty( XmlConstants.StoreGeneratedPatternAnnotation, TypeUsage.Create(EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.String)), storeGeneratedPattern.ToString())); } else { metadataProperty.Value = storeGeneratedPattern.ToString(); } }
public static void SetStoreGeneratedPattern( this EdmProperty property, StoreGeneratedPattern storeGeneratedPattern) { MetadataProperty metadataProperty; if (!property.MetadataProperties.TryGetValue("http://schemas.microsoft.com/ado/2009/02/edm/annotation:StoreGeneratedPattern", false, out metadataProperty)) { property.MetadataProperties.Source.Add(new MetadataProperty("http://schemas.microsoft.com/ado/2009/02/edm/annotation:StoreGeneratedPattern", TypeUsage.Create((EdmType)EdmProviderManifest.Instance.GetPrimitiveType(PrimitiveTypeKind.String)), (object)storeGeneratedPattern.ToString())); } else { metadataProperty.Value = (object)storeGeneratedPattern.ToString(); } }