public static Commercial FindByAuthentication(string aUsername, string aPassword) { using (var db = new LearningCompanyContext()) { return((from oCommcecial in db.Commerciaux where oCommcecial.NomUtilisateur == aUsername && oCommcecial.MotDePasse == aPassword select oCommcecial).FirstOrDefault()); } }
public List <DemandeClient> GetListeDemandesClientsEnAttente() { using (var db = new LearningCompanyContext()) { return((from oDemandeClient in db.DemandesClients where oDemandeClient.Client.Commercial.CommercialID == this.CommercialID && oDemandeClient.DateTraitement == null select oDemandeClient).ToList()); } }