/// <inheritdoc/> public virtual bool RuntimeKeyIsValid() { Guid result; string guid = RuntimeKey.ToString(); int subObjectIndex = guid.IndexOf("["); if (subObjectIndex != -1) //This means we're dealing with a sub-object and need to convert the runtime key. { guid = guid.Substring(0, subObjectIndex); } return(Guid.TryParse(guid, out result)); }
protected override void ProcessKeyAnnotations( IDictionary <string, object?> annotations, IKey key, RuntimeKey runtimeKey, bool runtime) { base.ProcessKeyAnnotations(annotations, key, runtimeKey, runtime); if (!runtime) { annotations.Remove(SqlServerAnnotationNames.Clustered); } }
public RuntimeForeignKey( IReadOnlyList <RuntimeProperty> dependentProperties, RuntimeKey principalKey, RuntimeEntityType dependentEntityType, RuntimeEntityType principalEntityType, DeleteBehavior deleteBehavior, bool unique, bool required, bool requiredDependent, bool ownership) { Properties = dependentProperties; PrincipalKey = principalKey; DeclaringEntityType = dependentEntityType; PrincipalEntityType = principalEntityType; _isRequired = required; _isRequiredDependent = requiredDependent; _deleteBehavior = deleteBehavior; _isUnique = unique; _isOwnership = ownership; }
/// <inheritdoc/> public bool RuntimeKeyIsValid() { Guid result; return(Guid.TryParse(RuntimeKey.ToString(), out result)); }