Print Page | Close Window

bug report

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2211
Printed Date: 08-Jun-2025 at 5:37am


Topic: bug report
Posted By: jcrada
Subject: bug report
Date Posted: 04-Oct-2010 at 7:17am
I have defined this simple verefier for the entity Person, this verifier verifies that the city and
the state are correct, (the state is the state of the city), for example if the person is from Los Angeles,
California, the user must entry, California and Los Angeles, not Los Angeles and Florida. this verifer works fine
the problem comes when you try to get the Principal Identity in the Server Side in a EntityServerQueryInterceptor
, it is always empty when the petition is about a Person normal for the others Entities
, after a couple of days trying to find an error in my code, I discovered that the problem was that the verifier use navigation properties, when
I change the verifiers to use the ids instead of the properties, its work fine, but Vs2010 never comes with exception or something


                                List<Verifier> verifiers = new List<Verifier>();

var v1 = new DelegatePropertyValueVerifier<Person>("The city must be in the state"EntityPropertyNames.LocationCity, false,
(itemToVerify, valueToVerify, verifierContext) =>
{
var locationCity = valueToVerify as City;
var res = locationCity != null && !locationCity.EntityAspect.IsNullEntity && itemToVerify.LocationState != locationCity.State;
return new VerifierResult(!res);
});
verifiers.Add(v1);



Replies:
Posted By: DenisK
Date Posted: 04-Oct-2010 at 3:48pm
Hi jcrada,

Could you upload a simple solution that can reproduce this bug?

Thank you.



Print Page | Close Window