DataJuggler / DataTier.Net

DataTier.Net is an Entity Framework alternative that makes it simple to create stored procedure powered data tiers.
22 stars 3 forks source link

Blazor Integration - Modify Data Object Builder to call delegate if any changes occur. #8

Closed DataJuggler closed 4 years ago

DataJuggler commented 5 years ago

Add a private variable and property for the Callback delegate.

As the fields are being written for the data class run (table name).data.cs, add a check to see if this project has CreateDataBinding set to true and if the value for the property is different than the current value. If it is different and the delegate exists, call the delegate which in turn calls the Data Service to perform the save.

DataJuggler commented 4 years ago

I added options to the Project table as well as DataJuggler.Net was updated to handle some virtual properties for a new field in the project table called CreateBindingCallback.

If this property is set to true, the code will call the delegate if any changes occur after you set the delegate.