Daniel Balla

How can I model a datacontract with multiple root elements to enforce exactly one root element at a time in the schema, so that the generated schema through svcutil metadata export would render the root elements in an xs:choice

Re: Windows Communication Foundation (Indigo) WCF datacontract root elements as choice (one and only one)

Carlos Figueira - MSFT

DataContract does not support xs:choice constructs. The goal of DC is to be an abstract data model that is very simple (atom/record/sequence), that maps to what can be represented in .NET and most "standard" programming languages. If you want to do schema-first development, you should use the XmlSerializer.