Skip to content

Commit baef282

Browse files
committed
#7469 - Fixed Ambiguous extension method issue by renaming our extension method from Value to GetValue
1 parent 6637bf5 commit baef282

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Umbraco.ModelsBuilder.Embedded/PublishedElementExtensions.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ public static class PublishedElementExtensions
1717
/// <summary>
1818
/// Gets the value of a property.
1919
/// </summary>
20-
public static TValue GetValue<TModel, TValue>(this TModel model, Expression<Func<TModel, TValue>> property, string culture = null, string segment = null, Fallback fallback = default, TValue defaultValue = default)
20+
public static TValue ValueByExpression<TModel, TValue>(this TModel model, Expression<Func<TModel, TValue>> property, string culture = null, string segment = null, Fallback fallback = default, TValue defaultValue = default)
2121
where TModel : IPublishedElement
2222
{
2323
var alias = GetAlias(model, property);
2424
return model.Value<TValue>(alias, culture, segment, fallback, defaultValue);
2525
}
2626

27+
//This cannot be public due to ambiguous issue with external ModelsBuilder if we do not rename.
2728
private static string GetAlias<TModel, TValue>(TModel model, Expression<Func<TModel, TValue>> property)
2829
{
2930
if (property.NodeType != ExpressionType.Lambda)

0 commit comments

Comments
 (0)