New Posts New Posts RSS Feed: bug report
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

bug report

 Post Reply Post Reply
Author
jcrada View Drop Down
Newbie
Newbie
Avatar

Joined: 03-Sep-2010
Location: Bogota
Posts: 6
Post Options Post Options   Quote jcrada Quote  Post ReplyReply Direct Link To This Post Topic: bug report
    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);
Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2010 at 3:48pm
Hi jcrada,

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

Thank you.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down