Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Business Layer Generator and Computed DateTime Fields
Message
De
18/02/2011 09:04:44
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Business Layer Generator and Computed DateTime Fields
Divers
Thread ID:
01500696
Message ID:
01500696
Vues:
104
Hi,

MM.NET 3.6

I have two computed datetime fields on table in my SQL Server database. When I run the Business Layer Generator, this code gets generated in the BO.cs:
		protected override void HookSetDefaultValues(PolicyHeaderEntity entity)
		{
			if (this.DefaultValues != null)
			{
				// Store the dynamic default values via the entity object
				entity.DatePaidTo = Defaults.DatePaidTo;
				entity.PremiumDue = Defaults.PremiumDue;
			}
But these fields are set to accept null values and I also cleared out the defaults for these fields in the generator. Of course this code causes an error:

"Property or indexer 'SamaanSystems.IAS.Business.PolicyHeaderEntity.DatePaidTo' cannot be assigned to -- it is read only"

For now I am just deleting the code, but is this a bug in the generator or is there something else I need to do?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform