I'm new to CSLA.net. So, we allow our business objects to hold invalid data while the user is still editing the windows or web form. What if a property should be int type? Are you all making all properties strings to hold the invalid data?
That doesn't seem to model the business correctly. Suppose I have a ShoppingCartItem class with Quantity field. Quantity should be an int when used by the system.
How is this typically done w/ CSLA?
Chris
We're planning to move to .Net 2.0 and I'm reading the 2.0 version of Rocky's book.
Nullable<int> is good for missing data. But, what if the user types letters in a field that is to be numeric. It would have to be stored as a string in the object, if I understand correctly and the object holds all the data.
Am I correct in thinking that the object always holds a copy of the data in the form?
I guess I should clarify we're only doing webforms right now.
You could create a textbox that accepts only integers. You could also use an adapter to wrap your object. The adapter would contain all string properties for the object that it wraps.
Ok, the adapter sounds good.
Thanks for the help.
Thanks for the helpful suggestions. We'll probably use validators.
Copyright (c) Marimer LLC