Mystogan
Mystogan

Reputation: 577

Expression bodied members + WCF =?

If I have a WCF service project where one of the classes used in the service looks like this:

public class Test {
    public int Num { get; set; }
    public bool IsHigh => Num > 7;
}

Then the expression bodied member seems to go missing in the generated wsdl/reference:

<xs:extension base="tns:Test">
    <xs:sequence>
        <xs:element minOccurs="0" name="Num" type="xs:int"/>
        // <--- Missing 'IsHigh'-member
    </xs:sequence>
</xs:extension>

Is there any way to make 'IsHigh' to be included (and subsequently be used in the calling client)?

(Or is it possible I have made an error somewhere else in my implementation, and that the expression bodied member should really be found in the reference?)

Grateful for any help!

Upvotes: 1

Views: 59

Answers (0)

Related Questions