General information
Category:
The Mere Mortals .NET Framework
Title:
Code architecture and MM.NET Business Layer Generator
I'm about to do the 4th regen of a business object using the MM.NET Business Layer Generator.
Each time I saved custom code off in notepad, and then re-inserted it into the newly genned business objects.
But why not use partial classes to keep the custom code separate from the generated code?
Anyone have tips/tricks/comments here?
I'm thinking adding
MyBusinessCustom.cs
MyBusinessDefaultsCustom.cs
MyBusinessRulesCustom.cs
to the standard generated
MyBusiness.cs
MyBusinessDefaults.cs
MyBusinessRules.cs
MyBusinessEntity.cs
MyBusinessDataAccess.cs
If this works out, I guess I'll eventually add something to the generator to create the ...Custom.cs files if they don't already exist.
Thanks!
-------------- below added:
On the other hand, (duh,) when the schema changes I only need to regen the DataAccess and Entity objects, which I've never made changes to.
I can typically hand code schema changes to Defaults and HookSetDefaultValues() in the business object.
I was regenning the business object too. Maybe doing a ...RulesCustom.cs for the Rules object would make sense, but I don't have rules on this particular business object.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only