Hi everyone,
Why does ReadOnlyBase have functions defined for Update, Delete, and Create. Even if all they do is throw exceptions, why have them at all in a read only class? I thought that it might be to implement an some DataPortal interface, but I can comment out any or all of these functions and the compiler doesn't complain.
Just curious.
BBM
Technically they are not required. Data portal would throw a method not found exception if they were removed and someone decided to try and call DataPortal.Update() on a ROB-derived object.
The reason they are there is to offer a nicer (?) exception message than method not found. Not all that important really, but having them in the code doesn't harm anything either, so I thought it was a decent trade-off.
Copyright (c) Marimer LLC