This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, we are currently migrating to Lightspeed, however I have an issue with additional properties as I am unable to figure out how to have them ignored by Lightspeed :( . I though the [Transient] attribute would be the way but it applies to fields, only. Any suggestions? Regards, Felix |
|
|
Transient is the correct attribute, but as you note, you must apply it to the backing field, not the property. (In fact, LightSpeed always ignores properties -- it is only ever interested in fields.) The downside of this is that it means you can't currently use C# automatic properties in a LightSpeed entity, because you can't access the backing field to apply [Transient] to it. We have a backlog item to try to find a way around this, but for now it means you must always specify the backing field explicitly if there is one. As a tip, VS2010 includes a 'propfull' snippet which creates a property plus backing field (as distinct from the 'prop' snippet which creates an auto property). I think this is built into VS2010, but if not, let me know and I will try to dig out where I got it from! |
|