This project has moved and is read-only. For the latest updates, please go here.

Exclude attribute from class

Feb 16, 2011 at 4:42 PM


Is it possible to excluse some attributs of a class that is going to be save in database.

I have some attributs of my class I don't want to be stored in the database.

Is that possible? :)


Feb 16, 2011 at 5:01 PM

Yes. You can decorate a field or property (to suppress it on that class) or a class definition (to suppress it globally) with the SterlingIgnore attribute.


Feb 17, 2011 at 8:41 AM

Cool :D

Thank you very much.

Feb 18, 2011 at 1:00 PM

hum, I have an issue...

        private String _arrowString;
        public String ArrowString

Is this how to use SerlingIgnore? Because it says to me that 'SterlingIgnore"  name type or namespace doesn't exists...

And there is no resolve in visual studio.

Feb 18, 2011 at 10:40 PM
Edited Feb 18, 2011 at 10:42 PM

Ensure you have added

using Wintellect.Sterling.Serialization 


and you should be fine.

As well, put the [SterlingIgnore] before the property...



private String _arrowString;
public String ArrowString { get { // } set { // } }


using Wintellect.Sterling.Serialization;

Feb 19, 2011 at 12:47 PM

Thanks for helping him out, I appreciate that - beat me to it!