Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code architecture and MM.NET Business Layer Generator
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01250320
Message ID:
01250394
Vues:
10
Patrick,

>But why not use partial classes to keep the custom code separate from the generated code?

Actually, all of the business and data access layer classes are already marked as partial. You can create another source code file to contain your custom methods and mark it partial. That way the BLG never overwrites your code.

For example, if you have an Employee.cs class, you can create an Employee.Partial.cs source code file and define a second part of the Employee class in that file and add your custom methods.

FYI, the next version of the BLG automatically generates this second partial class source code file for you. I recommend using the naming convention I show above since that's what the BLG will do by default.

>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.

You're right...bottom line, you normally don't need to regenerate your business object class--you can choose to update only the entity, rule, or data access object as needed.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform