i want to use xml serialization in wcf
am a beginner to wcf. by default its taking runtime serialization
my reference.cs
public partial class SeminarType : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
private int SerialNoField;
[System.Runtime.Serialization.OptionalFieldAttribute()]
private string MemNameField;
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
return this.extensionDataField;
}
set {
this.extensionDataField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
public int SerialNo {
get {
return this.SerialNoField;
}
set {
if ((this.SerialNoField.Equals(value) != true)) {
this.SerialNoField = value;
this.RaisePropertyChanged("SerialNo");
}
}
}
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
public string MemName {
get {
return this.MemNameField;
}
set {
if ((object.ReferenceEquals(this.MemNameField, value) != true)) {
this.MemNameField = value;
this.RaisePropertyChanged("MemName");
}
}
}
------------------------------------------------
Iservice
[XmlSerializerFormat]
[ServiceContract]
public interface ISeminarType
{
[OperationContract]
string TestMethod(SeminarType seminarType);
[OperationContract]
int GetNextCodeToInsert(string TableName, string ColumnName);
}
------------------------------------------------------
[DataContract]
public class SeminarType
{
[DataMember]
public int SerialNo { get; set; }
[DataMember]
public string MemName { get; set; }
}