Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generated Business Rules for Numeric Columns
Message
De
23/02/2009 15:38:23
 
 
À
19/02/2009 22:27:57
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01383003
Message ID:
01383581
Vues:
48
>The Business Layer Generator creates a business rule for each non-nullable numeric data type and uses mmType.IsEmpty() to test if the field is equal to 0. If it is 0, then it considers it a broken rule.

>bout half of my numeric fields can have 0 as a legitimate value so the automatically generated business rule is a problem for me. I have been commenting out these business rules, but it's becoming a hassle to maintain when I recreate the business objects.

>Is there a way to prevent these rules from automatically generating so I don't have to comment them out or is there a way for me to override them using the partial class? I don't believe the latter is possible, but may there is a way.

>Thanks,

>Al

Al,

If you select the "Allow Empty Value" checkbox along with the "Required" checkbox in the BLG, MM will generate a business rule using mmType.IsEmpty(value, true). This overload of the method will allow empty values (empty strings and zero values) but not nulls.
Greg Lee
GCL Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform