I noticed that this is handle in the the DDT Table Properties, so in order for me to upgrade this project, would it be just a matter to turn on those features and choose my Version Field which I have been using? or besides doing that in the DDT I should do some other modifications to my projects?
Thanks Greg.
One question, when using the DDT like I am now, and setting the BOM to create the BO from the DDT metadata would these properties be filled automatically?
I know I can test this, but I rather ask before start finding out with this particular project.
Then since I am using a base BO class, I tried to overwrite the CRUD properties so I can have this information added automatically to all my BOs, and guess what? yes, these properties are not marked as Overridable.
Here is the code I tried in my base BO:
'-- Setting CRUD to use Store Procedures Private _DeleteUsingStoredProcedure As Boolean = True Private _DeleteStoredProcedureName As String = Me.TableName.Trim & "_Delete" <Category(EDITOR_CATEGORY_CRUD), _ DefaultValue(False)> _ Public Overrides Property DeleteStoredProcedureName() As Boolean Get Return _DeleteStoredProcedureName End Get Set(ByVal value As Boolean) _DeleteStoredProcedureName = value End Set End Property <Category(EDITOR_CATEGORY_CRUD), _ DefaultValue(False)> _ Public Overrides Property DeleteUsingStoredProcedure() As Boolean Get Return _DeleteUsingStoredProcedure End Get Set(ByVal value As Boolean) _DeleteUsingStoredProcedure = value End Set End Property
<Category(EDITOR_CATEGORY_CRUD), _
DefaultValue(
_DeleteStoredProcedureName = value
_DeleteUsingStoredProcedure = value
Is there any other way this can be automated?
No, but you don't really need it to. If you are using the standard names that the DDT produces (TableName_Delete, for example) then you do not need to set the SPROC name, just set the property that indicates that the CRUD setting will be true and the default naming schema will be used. So in this case, just set the following properties to True:
Then if you are using row version concurrency, set the concurrency properties:
Automatically forcing the BO to set the stored procedure flags isn't really something that should be done as there are times you want to turn this off. But as for the names, you don't need to override them, just use the default naming convention and it will already be handled for you.
I made the changes to my base BO and like you said, it was straight forward using the default SP names.