how can I remove the xmlns:i="http://www.w3.org/2001/XMLSchema-instance" when using DataContractSerializer.
this is what I'm getting:
<ProfileModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Email>[email protected]</Email>
<FirstName>wolverine</FirstName>
<ID>ty1002225</ID>
<LastName>wolverine3</LastName>
<PhoneNumber>66332214477</PhoneNumber>
<SourceSystem>TY</SourceSystem>
</ProfileModel>
I want to get something like this:
<ProfileModel>
<Email>[email protected]</Email>
<FirstName>wolverine</FirstName>
<ID>ty1002225</ID>
<LastName>wolverine3</LastName>
<PhoneNumber>66332214477</PhoneNumber>
<SourceSystem>TY</SourceSystem>
</ProfileModel>
this is my model:
[DataContract(Namespace = "")]
public class CRMProfileModel
{
[DataMember]
public string FirstName { get; set; }
[DataMember]
public string LastName { get; set; }
[DataMember]
public string Email { get; set; }
[DataMember]
public string PhoneNumber { get; set; }
[DataMember]
public string SourceSystem { get; set; }
[DataMember]
public string ID { get; set; }
}
I'm trying to avoid to use string replace to remove it.