Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Business Layer Generator and Computed DateTime Fields
Message
From
18/02/2011 09:04:44
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Business Layer Generator and Computed DateTime Fields
Miscellaneous
Thread ID:
01500696
Message ID:
01500696
Views:
105
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
Next
Reply
Map
View

Click here to load this message in the networking platform