We are already using sprocs for all the CRUD. my real issue is that the signature for the Update sproc in SF only returns a rowcount, not a keyID. This makes sense since why would SF expect the keyid to change in an Update.
So if call my Update sproc I'll then have a situation where my BO will have the correct data with an incorrect keyID. Like this:
Table:
KeyID, ProductID, Name, Color, current
record 1
1, 1001, SomeThing, Blue, true
Fill my ProductBO as follows:
MyProduct.FillByPrimaryKey(1);
Now I change the MyProduct BO to this (the sproc manages the "current" part):
1, 1001, SomeThing2, Blue2
I call my Update sproc with MyProduct.Save();
Now the DB looks like:
1, 1001, SomeThing, Blue, false
2, 1001, SomeThing2, Blue2, true
This updates the data in the DB as I needed but leaves my BO with a bad KeyID (1 when it needs to be 2). I havent implemented it yet but I am planning on refreshing the BO after an Update to get the new real record. This seems inelegant and to easy to screw up so I was hoping someone else had a better strategy.
Thanks!