-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm using v4.0.0-preview4
This property:
[Projectable]
public string Status => IsDeceased
? "Deceased" + (DeceasedDate != null ? $" ({DeceasedDate.Value.ToDateString()})" : "")
: "";Generates this code:
static global::System.Linq.Expressions.Expression<global::System.Func<global::MyApp.MyModel, string>> Expression()
{
return (global::MyApp.MyModel @this) => @this.IsDeceased ? "Deceased" + (@this.DeceasedDate != null ? $" ({global::MyApp.Extensions.ToDateString(@this.DeceasedDate.Value)})" : "") : "";
}Which won't compile because in $" ({global::MyApp.Extensions.... - the colon (:) is a special character and breaks the generated interpolated string.
I think perhaps the fix would be to wrap the static method in parenthesis, e.g.:
return (global::MyApp.MyModel @this) => @this.IsDeceased ? "Deceased" + (@this.DeceasedDate != null ? $" ({(global::MyApp.Extensions.ToDateString(@this.DeceasedDate.Value))})" : "") : "";Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working