Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code architecture and MM.NET Business Layer Generator
Message
From
24/08/2007 14:52:50
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Code architecture and MM.NET Business Layer Generator
Miscellaneous
Thread ID:
01250320
Message ID:
01250320
Views:
66
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
Map
View

Click here to load this message in the networking platform