Hello
I am running the following LINQ query but it's throwing an error saying "Invalid ‘where’ condition. An entity member is invoking an invalid property or method."
List PPLyonIds = new List(); PPLyonIds = (from pp in context.CreateQuery() where nomsprenomscpdevtry.Contains(string.Concat(pp.nom.ToUpper(),pp.prenom.ToUpper())) select pp.Id).ToList(); var listReponseUpdate = (from rep in context.CreateQuery() where PPLyonIds.Contains(rep.personne_physique_cible.Id) && rep.Id == Guid.Parse("4B90DEA4-680C-EA11-80FE-005056B14DD3") //Guid.Parse("02D8C217-9ABE-E911-80E4-005056B2DCF2") select rep).ToList(); foreach (Reponse_de_campagne re in listReponseUpdate) { try { logger.Debug("debut mise à jour de la réponse campagne"); Reponse_de_campagne reponsecampagne = new Reponse_de_campagne(); reponsecampagne.Id = re.Id; reponsecampagne.rechercher(organisationProxy); reponsecampagne.retour_souscription = true; reponsecampagne.sauvegarder(organisationProxy); logger.Debug("La personne physique sous ID" re.personne_physique_cible.Id " est mis à jour"); } catch (Exception ex) { if (exceptions.ContainsKey(ex.Message)) { //Erreur déjà rencontré exceptions[ex.Message] ; } else { logger.Error(ex.Message "\n" ex.StackTrace); exceptions.Add(ex.Message, 1); } } }
Cordially