// renvoie true si le joueur n'a pas joué un match après la date fournie public Boolean checkJoueurSiPasParticipation(Guid joueurId, DateTime date) { try { int countJoueursParticipation; using (FifaManagerEphecEntities ctx = new FifaManagerEphecEntities(_Connection)) { countJoueursParticipation = ctx.NombreParticipationJoueurApresDate(joueurId, date); } if (countJoueursParticipation > 0) { BusinessError oBusiness = new BusinessError("Le joueur a été inscrit sur une feuille de match à une date postérieure"); throw oBusiness; } else { return(true); } } catch (Exception ex) { if (ex.InnerException != null && ex.InnerException is SqlException) { TechnicalError oErreur = new TechnicalError((SqlException)ex.InnerException); throw oErreur; } else { throw ex; } } }