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
|
i think this might be a bug...? have an entity with enum property. value in db is 0, enum does not define valid member for 0 (have explicit defined enum values). Don't ask why we did this - 'twas a bad idea, has now been fixed. :) anyhow, when entity materialised from db, it doesn't throw an exception. but when you try and push entity.AsDto() out, WCF blows up because value over the wire is not valid according to serialised enum. I would expect that LS would blow up if the int from the db is not represented by an enum member...? |
|
|
No, as far as the CLR is concerned, any value of the backing type can be stored in an enum variable. For example, any int is a valid value of any enum that's backed by Int32: public enum Name { We defer to the CLR behaviour. |
|