示例#1
0
 public static IEnumerable <IConventionEntityType> GetEntityTypes(this IConventionModel model, Type type)
 => model.FindEntityTypes(type);
示例#2
0
 /// <summary>
 ///     Returns a value indicating whether that target CLR type would correspond to an owned entity type.
 /// </summary>
 /// <param name="targetType">The target CLR type.</param>
 /// <param name="conventionModel">The model.</param>
 /// <returns><see langword="true" /> if the given CLR type corresponds to an owned entity type.</returns>
 protected virtual bool IsOwned(Type targetType, IConventionModel conventionModel)
 => conventionModel.FindIsOwnedConfigurationSource(targetType) != null ||
 conventionModel.FindEntityTypes(targetType).Any(t => t.IsOwned());