Process to verify if Business Object Exist - Do we use a Checker Object now? #4255
-
Hello all, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I have used command objects for 'Exists' pattern in Csla 4.xx, but I have also used another method in my objects that works perfectly fine with our SQL server database(s). |
Beta Was this translation helpful? Give feedback.
I have used command objects for 'Exists' pattern in Csla 4.xx, but I have also used another method in my objects that works perfectly fine with our SQL server database(s).
When I 'fetch' an object, I check for the property that corresponds to the Primary property (identity column) of the (main) table in the SQL server. If it's greater than zero, I know the fetch was successful. If not, I show the appropriate message to the user.
Our objects aren't 1-1 with SQL tables but we always have a 'main' table that corresponds to the object graph.