Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Entity default values not being maintained
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01445715
Message ID:
01445984
Vues:
37
Further investigation showed that for some reason the EntityObject is not being created. I found this out by stepping through the code simultaeously on my two machines.

When the Entity property for the BO on the XP machine ran its Entity property runs through the 'get' section:
When the Entity property for the BO on the new Win 7 machine ran it Entity property runs through the 'set' section. This explains why the entity object has null values. The question is why is this happening.

Any ideas as to why this would happen??

TIA
public override FirmAcctEntity Entity
		{
			get
			{
				if (this._entity == null)
				{
					this._entity = this.CreateEntityObject();
				}
				this._entity.SetDataRow(this.DataRow);
				return this._entity;
			}
			set { this._entity = value; }
		}
>Bob,
>
>>I am in the process of moving my development environment from my old PC (Windows XP) to a new Windows 7 64 bit OS machine. I have installed MM.NET and moved over my code to the new PC. The version of MM.NET on both machines is 3.5.
>>
>>In testing the business object logic, I am finding out that the Entity values that are being set as default values in the HookSetDefault method of the BO are not being held, meaning that the code is executing however, later on when the Save takes place these values are no longer there (e.g. date default values that should have been set to DateTime.Today are taking on '01/01/0001' and other char and numeric types are taking on null values).
>>
>>Is this familiar to anyone? Have I missed a setting somewhere?
>
>I agree with Tim that this is unusual. I recommend setting a breakpoint in one of your entity object's properties to see when/how the value is getting changed.
>
>Best Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform