コード例 #1
0
        private void ProcessElement(IReadOnlyEntityType entityType, string version)
        {
            ProcessElement((IReadOnlyAnnotatable)entityType, version);

            if ((version.StartsWith("2.0", StringComparison.Ordinal) ||
                 version.StartsWith("2.1", StringComparison.Ordinal)) &&
                entityType is IMutableEntityType mutableEntityType &&
                !entityType.IsOwned())
            {
                UpdateOwnedTypes(mutableEntityType);
            }
        }
コード例 #2
0
 private static string?GetDefaultContainer(IReadOnlyEntityType entityType)
 => entityType.IsOwned()
         ? null
         : entityType.Model.GetDefaultContainer()
 ?? entityType.ShortName();
コード例 #3
0
 public static bool IsOwned([NotNull] this IReadOnlyEntityType entityType)
 => entityType.IsOwned();
コード例 #4
0
 public static bool IsDocumentRoot([NotNull] this IReadOnlyEntityType entityType)
 => entityType.BaseType?.IsDocumentRoot()
 ?? (!entityType.IsOwned() ||
     entityType[CosmosAnnotationNames.ContainerName] != null);