While not an actually responsibility of the Linq provider, the default serialization library, NewtonSoft, supports field the following serialization attributes:
- DataContractAttribute
- DataMemberAttribute
- NonSerializedAttribute
- All NewtonSoft attributes.
Please refer to their documentation for issues regarding serialization. Note that in a future release, custom ITypeSerializer implementations for serializers other than NewtonSoft will be supported, in which case the attributes supported by any other 3rd party serializers implemented will need to be used.
Mixing of attribute types is supported by NewtonSoft. Here is an example of mixing JsonPropertyAttribute and DataMemberAttribute:
public class Beer
{
[Key]
[JsonProperty("name")]
public string Name { get; set; }
[DataMember(Name = "abv")]
public decimal Abv { get; set; }
[JsonProperty("ibu")]
public decimal Ibu { get; set; }
...
}
If you think you maybe be using a custom serializer when support becomes available, you may want to use the .NET attributes.