I'm creating a web api 2 application and I have been using the XMLSerializer to serialize my objects. However, due to legacy objects I added after that, everything I did using the serializer is coming in null.
I think my only choice is to use DataContracts however is there a way to add a default namespace and not have to add [DataContract] and [DataMember] to all the objects in my api?
Here is a simplified example of an object
public class Color
{
public int ID { get; set; }
public Guid? SiteID { get; set; }
public int? Rank { get; set; }
public string Name { get; set; }
public string Code { get; set; }
}