Skip to content

Commit

Permalink
Make the method that use propertyBuildAction obsolete.
Browse files Browse the repository at this point in the history
  • Loading branch information
maliming committed Aug 13, 2020
1 parent 9adab77 commit 2a5ab06
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Volo.Abp.ObjectExtending
{
public static class EfCoreObjectExtensionInfoExtensions
{
[Obsolete("Use MapEfCoreProperty with EntityTypeAndPropertyBuildAction parameters.")]
public static ObjectExtensionInfo MapEfCoreProperty<TProperty>(
[NotNull] this ObjectExtensionInfo objectExtensionInfo,
[NotNull] string propertyName,
Expand All @@ -18,6 +19,7 @@ public static ObjectExtensionInfo MapEfCoreProperty<TProperty>(
);
}

[Obsolete("Use MapEfCoreProperty with EntityTypeAndPropertyBuildAction parameters.")]
public static ObjectExtensionInfo MapEfCoreProperty(
[NotNull] this ObjectExtensionInfo objectExtensionInfo,
[NotNull] Type propertyType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static ObjectExtensionManager MapEfCoreProperty(
);
}

[Obsolete("Use MapEfCoreProperty with EntityTypeAndPropertyBuildAction parameters.")]
public static ObjectExtensionManager MapEfCoreProperty<TEntity, TProperty>(
[NotNull] this ObjectExtensionManager objectExtensionManager,
[NotNull] string propertyName,
Expand All @@ -53,6 +54,7 @@ public static ObjectExtensionManager MapEfCoreProperty<TEntity, TProperty>(
);
}

[Obsolete("Use MapEfCoreProperty with EntityTypeAndPropertyBuildAction parameters.")]
public static ObjectExtensionManager MapEfCoreProperty(
[NotNull] this ObjectExtensionManager objectExtensionManager,
[NotNull] Type entityType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static ObjectExtensionPropertyInfo MapEfCore(
return propertyExtension;
}

[Obsolete("Use MapEfCore with EntityTypeAndPropertyBuildAction parameters.")]
[NotNull]
public static ObjectExtensionPropertyInfo MapEfCore(
[NotNull] this ObjectExtensionPropertyInfo propertyExtension,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public class ObjectExtensionPropertyInfoEfCoreMappingOptions
[NotNull]
public ObjectExtensionInfo ObjectExtension => ExtensionProperty.ObjectExtension;

[Obsolete("Use EntityTypeAndPropertyBuildAction property.")]
[CanBeNull]
public Action<PropertyBuilder> PropertyBuildAction { get; set; }

[CanBeNull]
public Action<EntityTypeBuilder, PropertyBuilder> EntityTypeAndPropertyBuildAction { get; set; }

[Obsolete("Use other constructors.")]
public ObjectExtensionPropertyInfoEfCoreMappingOptions(
[NotNull] ObjectExtensionPropertyInfo extensionProperty,
[CanBeNull] Action<PropertyBuilder> propertyBuildAction = null,
Expand All @@ -28,5 +30,14 @@ public ObjectExtensionPropertyInfoEfCoreMappingOptions(
PropertyBuildAction = propertyBuildAction;
EntityTypeAndPropertyBuildAction = entityTypeAndPropertyBuildAction;
}

public ObjectExtensionPropertyInfoEfCoreMappingOptions(
[NotNull] ObjectExtensionPropertyInfo extensionProperty,
[CanBeNull] Action<EntityTypeBuilder, PropertyBuilder> entityTypeAndPropertyBuildAction = null)
{
ExtensionProperty = Check.NotNull(extensionProperty, nameof(extensionProperty));

EntityTypeAndPropertyBuildAction = entityTypeAndPropertyBuildAction;
}
}
}

0 comments on commit 2a5ab06

Please sign in to comment.