home recent topics recent posts search faq  

Huagati Systems Support Forum



register | lost password   open id sign in with Twitter
Messages in this topic - RSS

Home » Huagati DBML/EDMX Tools Support » New features wishlist forum » Insert XmlIgnoreAttribute

What new feature(s) would you like to see in the add-in? Post your suggestions here.
12/14/2010 2:04:05 AM

jeremyholt
jeremyholt
Posts: 4
Hi,

I have suddenly realized that I need to make a number of the entities in my dbml [Serializable]. All of the entities have a Binary TimeStamp field, for which I need to provide the XmlIgnoreAttribute (you can't serialize a Linq.Binary type). At the moment, the only way I can see of doing this is manually copying the fields from the designer.cs to the partial code behind and adding the attribute there.

It would be great if it were possible for the DBML/EDMX to have an option to "automagically" mark Binary fields as XmlIgnore.

Regards
Jeremy
0 permalink
12/14/2010 5:01:44 AM

Kristofer Andersson
Kristofer Andersson
Moderator
Posts: 312
Hi Jeremy,

Depending on why you need to serialize the entities, a better option might be to use the DataContractSerializer. It can serialize and deserialize System.Data.Linq.Binary and is in general more suitable for serializing and deserializing individual entities as well as entire object graphs. Simply change the serialization mode property in the L2S designer from None to Unidirectional and your entity classes will be tagged up with the attributes needed to use the DataContractSerializer.

Best regards,
Kristofer
0 permalink




Powered by Jitbit Forum 7.1.0.0 © 2006-2011 Jitbit Software