Hello everyone, I want to find a person (Comensal class) given any of three attributes. I have this query by example:
Comensal p = new Comensal();
if (aCodigoBarras != String.Empty) p.CodigoBarras = aCodigoBarras;
if (aNumeroUCI != String.Empty) p.IdExpediente = aNumeroUCI;
if (aCI != String.Empty) p.CI = aCI;
IObjectSet result = dbPersonas.Get(p);
Which works really fast, but does not find some persons all the times, I'm still figuring out which set of persons these are. However, this code:
IList<Comensal> result = dbPersonas.Query<Comensal>(delegate(Comensal ap)
{
return ap.IdExpediente == aNumeroUCI ||
ap.CI == aCI ||
ap.CodigoBarras == aCodigoBarras;
}
);
...does find every single person, though it's significantly slower. Can anyone spot the difference?? Its the same database, same persons, same everything.
Thanks in advance.